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!
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?
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!
Comments
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/
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
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
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/
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com