Incorrect page summary
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
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
This discussion has been closed.
Comments
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
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
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
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
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com