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

Question about a DBCalc component

edited June 2005 in General
Greetings. I have a dbcalc field on a group footer band Under certain data
conditions I want to suppress the group break altogether. In other words, I
don't want it to print the footer band and I don't want the dbcalc to be
reset to zero. How is this done?

In the group footer's beforeprint event I have this pseudo code:

If record-type = 0 then
footerband.visible:= false
else
footerband.visible:= true;

While this suppresses the actual printing, my dbcalc gets reset when I don't
want it to.

Thanks in Advance!

Debbie Erickson

Comments

  • edited June 2005
    Hi Debbie,

    You could try to approach this in two ways.

    1. Inside the GroupFooter.BeforePrint event, if the record type is 0, set
    the visibility of the band to false and save a copy of the DBCalc's value in
    a private variable. Then inside the TppDBCalc.OnGroupBreak event,
    initialize the DBCalc's value to the stored private value if record type is
    0.

    2. Rid yourself of these DBCalcs and strictly use TppVariables instead to
    calculate the sum and reset it's value when you need it too.

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