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

Resetting values

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

Comments

  • edited July 2004
    Hi Shanil,

    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.

    --
    Best Regards,

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