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

row number / record number

edited June 2004 in General
is there a way to get a row number or record number for the current
row in report builder (want to print this with the record for tracking
purposes).

thanks!
-martha

Comments

  • edited June 2004
    Hi Martha,

    Unfortunately the TppDBPipeline does not know the size of the dataset it is
    traversing so it does not keep track of which record number it is currently
    on. One way you could find out would be to place a TppVariable inside the
    DetailBand and in its OnCalc event keep track how many times it is fired.
    This would reveal which record number you are currently traversing. If you
    would just like to use the TppVariable as a counter, you can set its
    Visibility to False.

    --
    Thanks for supporting ReportBuilder! Please vote for ReportBuilder in the
    Delphi Informant Readers Choice awards!

    http://www.delphizine.com/ballot2004/

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2004
    i thought of something like that but i found it fired if it was paging
    forward or backward and i haven't been able to find a sure fire method
    of tracking when the value needs to get incremented (for forward) or
    decremented (for previous). record 1 should always be record 1. any
    suggestions to determine when the scrolling is next/previous?

    thanks!
    -martha

  • edited June 2004
    Hi Martha,

    Two things to try...

    1. Try setting the Report.CachePages to True and see if that helps. This
    will cache each page in memory so when you navigat back through your report,
    the pages do not need to be re-generated and therefore do not change.

    2. Try setting a global variable each time the page changes. Check the
    Report.AbsolutePageNo and compare it to the previously set page variable.
    Then as a person navigates your report, you will be able to determine
    whether they are moving forward or backward and adjust the variable values
    accordingly.

    --
    Thanks for supporting ReportBuilder! Please vote for ReportBuilder in the
    Delphi Informant Readers Choice awards!

    http://www.delphizine.com/ballot2004/

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.