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

Page total of subreport

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

Comments

  • edited July 2004
    Hi Vincent,

    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

    --
    Best Regards,

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