Can't get first record with a JIT pipeline
I have a grid that's populated by a TAdsTable. The user can filter the data
in this grid many different ways and I've set up a report that prints the
records currently matching whatever filter has been set. I'm using a
JITPipeline to send the records from the TAdsTable to the report.
Unfortunately the report is always missing the first record in the list.
I've set the OnGotoFirstRecord event to execute TAdsTable.First. I've also
set the OnRecordPositionChange event to execute TAdsTable.Next. Am I
setting these correctly or is there something else I need to set? The
report works perfectly except for the missing first record.
Michael Gregg
in this grid many different ways and I've set up a report that prints the
records currently matching whatever filter has been set. I'm using a
JITPipeline to send the records from the TAdsTable to the report.
Unfortunately the report is always missing the first record in the list.
I've set the OnGotoFirstRecord event to execute TAdsTable.First. I've also
set the OnRecordPositionChange event to execute TAdsTable.Next. Am I
setting these correctly or is there something else I need to set? The
report works perfectly except for the missing first record.
Michael Gregg
This discussion has been closed.
Comments
The OnRecordPositionChange fires before the JITPipeline gets the field
value, so if you call Table.Next in that event, you will essentially be
starting on your second record. If you are always incrementing your record
index by one, try calling Table.Next in the OnTraverseBy event instead. If
you would like to have control over the increment try making a call to the
Table.MoveBy(aIncrement); method.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Michael Gregg