Problem a programmatic acumulator
Hi, I'm trying to show at the bottom of my report a value that displays the
total sum of a field that is displayed on the detail band. In the event
beforeprint of the detail I add the value of that field to a variable, and
at the bottom of the report I print that value. All goes right until many
pages are generated, because this value at the bottom never is equal to the
sum of the field on the detail. Always is greater (I have notice that the
first value of next page is added on prior page, and then re-added on next
page, sometimes ignoring second value of new page). Which are the right
events I must use to avoid this ? I know that ppVars do it right, but I need
to avoid the use of ppVars and OnCalc event.
Thank you in advance...
I use Delphi 5 and ReportBuilder 5.55 Professional Edition.
total sum of a field that is displayed on the detail band. In the event
beforeprint of the detail I add the value of that field to a variable, and
at the bottom of the report I print that value. All goes right until many
pages are generated, because this value at the bottom never is equal to the
sum of the field on the detail. Always is greater (I have notice that the
first value of next page is added on prior page, and then re-added on next
page, sometimes ignoring second value of new page). Which are the right
events I must use to avoid this ? I know that ppVars do it right, but I need
to avoid the use of ppVars and OnCalc event.
Thank you in advance...
I use Delphi 5 and ReportBuilder 5.55 Professional Edition.
This discussion has been closed.
Comments
Simply place the DBCalc in the Footer band, point it at the desired field in
the detail and set it's calculation to sum.
--
Cheers,
Alexander Kramnik
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com