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

Display running sum amount brought forward from the previous page

edited April 2007 in General
Hi,
Can any one tell me how to display the sum amount from previous pages
in the page header?

Thanks

Comments

  • edited April 2007
    Hi Vincent,

    Try placing a TppVariable inside the footer band of the report set to
    calculate on traversal and another TppVariable inside the header band.
    Inside the first variable's OnCalc event, calculate the running total and
    assign its value to the variable in the header. Take a look at the
    following example I created that does this.

    http://www.digital-metaphors.com/tips/RunningTotalInHeader.zip

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited April 2007
    Hi, Nico,
    I use the same method in my report but the header variable always
    sum the first data amount in every page( even in the first page).
    Is there any other setting I have to take care


    Vincent
    ps. I am using Report builder 10.02 in delphi 2006

  • edited April 2007
    Hi Vincent,

    Please send all attachments to support@digital-metaphors.com.

    Due to the timing in which variables are calculated, it seems the next
    record is being added to the value of the variable. You can try to subtract
    this value from the header variable's value.

    Value := Value + ppReport1.DataPipeline['AmountPaid'];
    ppVariable1.Value := Value - ppReport1.DataPipeline['AmountPaid'];

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

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