Last record in frxUserDataSet doesn't print.
Hi,
I have made a collection class with procedure First, Last, Prior, Next, BoL (Begin of List) and EoL (End of List) so it can be used together with frxUserDataSet's OnFirst, OnPrior, OnNext and OnCheckEOF events. OnGetValue event is where I retrieve all informations for the current record which can be accessed by the collection's ItemIndex (index for the current record) property. The problem I'm having here is the last record doesn't come up. I've tried playing with the RangeBegin, RangeEnd and RangeEndCount, but still get the same problem.
Is it in the OnCheckEOF event, after the EOF parameter sets to True, will stop triggering the OnGetValue event?
I have made a collection class with procedure First, Last, Prior, Next, BoL (Begin of List) and EoL (End of List) so it can be used together with frxUserDataSet's OnFirst, OnPrior, OnNext and OnCheckEOF events. OnGetValue event is where I retrieve all informations for the current record which can be accessed by the collection's ItemIndex (index for the current record) property. The problem I'm having here is the last record doesn't come up. I've tried playing with the RangeBegin, RangeEnd and RangeEndCount, but still get the same problem.
Is it in the OnCheckEOF event, after the EOF parameter sets to True, will stop triggering the OnGetValue event?
Comments
tz@fast-report.com
I think I know what the problem is. In OnCheckEOF event, after the Eof parameter sets to True, the OnGetValue event will stop triggering meaning that if I use ItemIndex starting from 0 to Count-1 (in this case, Yes) and the Eof parameter sets to True when ItemIndex = Count-1, the last record (at index Count-1) will not be retrieved. So if I set Eof to True when ItemIndex = Count, then the last record will be retrieved. BTW, I'll send a sample to demonstrate this.