Wrong calc totals after page break
When a page break occurs, the across-group total gets out of sync with the
within-group (nested) total. Also, to get the within-group total right, I
had to set the ppVariable to 0.0 in the ChildReport startpage event.
However, the across-group total doesn't respond to my attempt to save the
current across-group total in the AfterGroupBreak event so I can subtract
the within-group total before setting it to 0.0. Apparently, the totals
calculation begins before the page break, then starts over after the page
break.
Isn't there some property that controls the ppVariable calculation at a page
break?
What can I do to make the totals agree?
Thanks,
Dave McMullen
within-group (nested) total. Also, to get the within-group total right, I
had to set the ppVariable to 0.0 in the ChildReport startpage event.
However, the across-group total doesn't respond to my attempt to save the
current across-group total in the AfterGroupBreak event so I can subtract
the within-group total before setting it to 0.0. Apparently, the totals
calculation begins before the page break, then starts over after the page
break.
Isn't there some property that controls the ppVariable calculation at a page
break?
What can I do to make the totals agree?
Thanks,
Dave McMullen
This discussion has been closed.
Comments
events. Even if the last band doesn't fit, the variable will have one more
value than actually printed on the page. When the band doesn't fit, it has
to let the band generate again on the next page, firing the OnCalcs again.
The report engine takes care of trying to restore the variable to the proper
value for the next page. There is a Timing dialog which controls when to
reset the value of a TppVariable, but there is no property to control the
value at a page break. Basically, you need to save the variable's value
only when the detail band prints on a page. Try using the
DetailBand.AfterPrint event. The report engine should have restored the
variable's value by this time (when the last detail band doesn't fit) to the
value it had before the band began printing, so that when its OnCalc fires
again for the next page, it will work.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com