Summing the variables
I need help on summing variables: I have one variable in a detail band,
which represents a sum of two db fields.
In detail band it calculates fine, but when I put it in summary band it
doesn't do the overall sum well.
I've tried Timing setting on ReportStart/ ReportEnd and I've tried adding
sum to the Calculations part of the variable, but I get an error
'Undeclared idetifier: SUM' and on Timing setting it gives me either first
or last value of the field as seen in the detail band.
Can anyone help me with this?
Thanx, Marina.
which represents a sum of two db fields.
In detail band it calculates fine, but when I put it in summary band it
doesn't do the overall sum well.
I've tried Timing setting on ReportStart/ ReportEnd and I've tried adding
sum to the Calculations part of the variable, but I get an error
'Undeclared idetifier: SUM' and on Timing setting it gives me either first
or last value of the field as seen in the detail band.
Can anyone help me with this?
Thanx, Marina.
This discussion has been closed.
Comments
version. Make sure you only use the OnCalc event of the variables to set
their value.
Are you trying to summarize across subreports? This won't work, as the
variable will reset after each subreport prints on the main report.
Can you provide a simple example to support@digital-metaphors.com which
shows the problem and how you would like it to work?
Here is an example which creates a running total in the detail band of a
subreport with respect to all records for the main report. Perhaps this
technique can provide some insight:
http://www.digital-metaphors.com/tips/RunningTotalInDetailSubreport.zip
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
have to use another variable to store the total, separate from your running
total.
Variable2.Value := Variable2.Value + dsTable1_pipe['Field1'] +
dsTable1_pipe['Field2'];
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com