Variables in Totals Again
I created some variables in the group footer for totals.
Then I reset them to zero in the same group's header (after print) - for
each group.
That seemed to be working. But now with more data I think it is
resetting again when the group extends to a second page. Can variables
be reset this way?
Then I reset them to zero in the same group's header (after print) - for
each group.
That seemed to be working. But now with more data I think it is
resetting again when the group extends to a second page. Can variables
be reset this way?
This discussion has been closed.
Comments
Group.ReprintOnSubSequentPage = False.
When a band attempts to print, it fires the BeforePrint event. Then the
engine measures to see if the band will fit on the page. If it doesn't fit
at all, and no components of the band can print on the page, then the band's
AfterPrint event fires. Then the next pages starts. The band fires its
BeforePrint event again. Then the engine measures to see if the band can fit
on the page. If it fits, then the band fires the BeforeGenerate event. Then
the AfterGenerate event when it finishes the band and then the AfterPrint
event.
The Before/After Print events fires whenever the band has a chance to print.
The Generate events fire whenever the band is actually attempting to print
something on the page. If any part of the band is to print on a page, then
the BeforeGenerate and AfterGenerate events will fire. This can happen if a
single band breaks across multiple pages.
What is the timing on the variable's reset option in the timing dialog? It
should be set to GroupEnd or GroupStart if you want the variable to
automatically reset itself, instead of manually doing it in the group header
band's AfterPrint event.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
Thanks. I set the "Reset Type" to Group Start and the "Reset Component" to the
Group Name and the variables reset properly. And I like that a lot better than
manually setting them based on when things print. In my case the groups extend
over more than one page and I want the printing to be done on each page for
headers.
Thanks,
Patrick Moloney
Sandrock Software Corp.