Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Can't get first record with a JIT pipeline

edited August 2004 in General
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

Comments

  • edited August 2004
    Hi Michael,

    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.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited August 2004
    Thanks. The OnTraverseBy event works perfectly.

    Michael Gregg


This discussion has been closed.