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

problem with TppDBCalc component on multi page reports

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

Comments

  • edited April 2004
    Hi Stefanos,

    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

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited April 2004
    Nico Cizik (Digital Metaphors) wrote:

    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
This discussion has been closed.