Question about a DBCalc component
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
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
This discussion has been closed.
Comments
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
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com