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

Incorrect page summary

edited February 2007 in General
Hi,

I created a simple report with on the detail band two fields:

- Ammount (DBText)
- Description (DBRichText)

I need a total of the ammount (per page) so in the footer I created a DBCalc
item that displays the sum of the ammount.

The problem is that the summary isn't always calculated correctly, it looks
like sometimes a detail record doesn't fit the page anymore but is already
used in the calculation of the sum item.
This seems to happen when a RichEdit is used in the detail band with the
stretch property set to true. Is this a known problem and is there a
solution to this problem?

Thanks in advance,

Mark Wittens


I'm using:
RB version 10.04 with Delphi 7

Comments

  • edited February 2007
    Hi Mark,

    Instead of using a DBCalc, try placing a TppVariable in the footer band and
    in its OnCalc event, accumilate the sum of the DB field as it traverses.

    Value := Value + ppReport.DataPipeline['MyField'];

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2007
    Hi,

    Thanks for the response, I just tried using the TppVariable but
    (unfortunatly) with the same result, the first value from the next page is
    still added to the total of the current page.
    Any other suggestions?

    Regards,

    Mark Wittens

  • edited February 2007
    Hi Mark,

    Are you able to recreate this issue with a simple app I could run on my
    machine? If so, please send it in .zip format to
    support@digital-metaphors.com and I'll take a look at it. In my testing I
    was unable to see the incorrect calculations in footer band. This
    (calculating a sum in the page footer with a dynamic detail) was a
    limitation of ReportBuilder for quite some time until we added support for
    it in RB 9. We have been working ever since trying to cover every scenario
    that would cause an incorrect calculation.

    --
    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.