Page total of subreport
Hi,
I am trying to print page total of a subreport in a report.
The subreport span several pages. I am using a Tppvariable component in the
subreport and in the on-calc event, I add the amount in the subreport data
to another Tppvariable component which is in the Main report footer, and
set the
resetType of this TppVariable component to PageEnd/PageStart.
But I found that every page total will include the first record amount in
the next page.May I know what is the proper way to print page total?
I am trying to print page total of a subreport in a report.
The subreport span several pages. I am using a Tppvariable component in the
subreport and in the on-calc event, I add the amount in the subreport data
to another Tppvariable component which is in the Main report footer, and
set the
resetType of this TppVariable component to PageEnd/PageStart.
But I found that every page total will include the first record amount in
the next page.May I know what is the proper way to print page total?
This discussion has been closed.
Comments
There is a limitation with using the Page Footer to calculate a page total
when you have a dynamic detail band. The OnCalc event fires too late to
know that the page has broken and adds the next value to the sum. As a
workaround, you can use the DetailBand.BeforeGenerate event instead. This
event is not meant to have calculations in it so you will need to add some
checks to be sure the calculations are only made once per record. Check out
the example below on how to do this.
http://www.digital-metaphors.com/tips/PageFooterSum.zip
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com