Resetting values
Hi,
I have a report that uses some delphi variables that work as running totals.
When I preview the report, it spits out the correct values. When I go to
print it, it shows "Accessing Data..." at all the values are doubled, ie not
reset. What would be the most suitable way to reset these values? I have
tried resetting it on various events of the report, like BeforePrint,
OnPrintDialogClose etc, but they don't seem to be consistent.
Some work fine if Print All pages are selected, but if I select Current Page
it doesn't print as desired. I CachePages so why does RB access data again
on print?
Thanks
--
RB 6.03
Delphi 6
Cheers,
Shanil
I have a report that uses some delphi variables that work as running totals.
When I preview the report, it spits out the correct values. When I go to
print it, it shows "Accessing Data..." at all the values are doubled, ie not
reset. What would be the most suitable way to reset these values? I have
tried resetting it on various events of the report, like BeforePrint,
OnPrintDialogClose etc, but they don't seem to be consistent.
Some work fine if Print All pages are selected, but if I select Current Page
it doesn't print as desired. I CachePages so why does RB access data again
on print?
Thanks
--
RB 6.03
Delphi 6
Cheers,
Shanil
This discussion has been closed.
Comments
The only event in ReportBuilder that is guarenteed only to fire once per
traversal is the TppVariable.OnCalc event. Instead of using Delphi
variables, try using TppVariables to keep track of a running total. Then
you can use the "Timing" dialog of the TppVariable to define when you would
like the variable to reset.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com