problem with TppDBCalc component on multi page reports
I am using: ReportBuilder 7.03, Delphi 5.0, Win2K sp3,
HP LaserJet 4050 Series PCL 6.
With JITPipeline I'm trying to show some calculated data.
On the report footer I place some TppDBCalc components
to show sum, averages, min, max etc.
In the case of one page report, calculation of DBCalc are
correct. However in the case of a multiple page report,
DBCalc considers records from all pages until current
page plus the first record of the next page printed.
The expected (desired) behaviour would be to consider
all pages until current page, but not the first record
of the next page printed.
By experimenting with DBCalc/Report/Pipeline properties
I couldn't change this bahaviour.
Is there a work arround?
HP LaserJet 4050 Series PCL 6.
With JITPipeline I'm trying to show some calculated data.
On the report footer I place some TppDBCalc components
to show sum, averages, min, max etc.
In the case of one page report, calculation of DBCalc are
correct. However in the case of a multiple page report,
DBCalc considers records from all pages until current
page plus the first record of the next page printed.
The expected (desired) behaviour would be to consider
all pages until current page, but not the first record
of the next page printed.
By experimenting with DBCalc/Report/Pipeline properties
I couldn't change this bahaviour.
Is there a work arround?
This discussion has been closed.
Comments
This is a limitation of the ReportBuilder engine. Calculating a sum inside
the page footer with a dynamic detail band across pages causes this
behavior. The only workaround for this issue is to use TppVariables instead
of a DBCalc and make the calculations manually. Then instead of using the
OnCalc event, try using the DetailBand.BeforeGenerate or AfterGenerate.
Below is an example of this.
http://www.digital-metaphors.com/tips/PageFooterSum.zip
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Dear Nico,
Thank you for your advice: when I've switched
PrintHeight property to phStatic (in Detail band),
all the calculations are made correct.
Note that the same behaviour occurs in your
example, namely, when setting the PrintHeight to phDynamic.
regards,
Stefanos Kozanis