using running total to display grand total in summary
I have a report where I want to show the grand totals for a number of
columns in the summary. I have set up running totals in the group
header, and simply tried to display the final value of the running total
in the summary.
My problem is that only the first column totals properly - the others
seem to ignore the final value (ie, they show the 2nd last 'running
total' value).
With the basic setup below, only Value1Total is accurate, although the
settings are exactly the same for each field.
I have tried playing with the timing, but since each field is set up the
same way and only the first one calculates properly, I wonder if this
might be a known bug.
I am using ver 7.04, and don't really have a choice to upgrade.
any suggestions are much appreciated!
-Terry
--------------------------------------------------------
Group(1) header:
Value1 | Value2 | Value3 | ...
Value1running | Value2running | Value3running | ...
--------------------------------------------------------
Summary:
Value1Total | Value2Total | Value3Total | ...
--------------------------------------------------------
Value*:
dbcalc, double
timing: Calculate on traversal, reset on reportEnd
Value*running: (not visible)
dbcalc, double
timing: Calculate on Group(1) Start, reset on reportEnd
oncalc: Value := value + Value*.value
Value*Total:
dbcalc, double
timing: Calculate on traversal, reset on reportEnd
oncalc: value := Value*running.value
columns in the summary. I have set up running totals in the group
header, and simply tried to display the final value of the running total
in the summary.
My problem is that only the first column totals properly - the others
seem to ignore the final value (ie, they show the 2nd last 'running
total' value).
With the basic setup below, only Value1Total is accurate, although the
settings are exactly the same for each field.
I have tried playing with the timing, but since each field is set up the
same way and only the first one calculates properly, I wonder if this
might be a known bug.
I am using ver 7.04, and don't really have a choice to upgrade.
any suggestions are much appreciated!
-Terry
--------------------------------------------------------
Group(1) header:
Value1 | Value2 | Value3 | ...
Value1running | Value2running | Value3running | ...
--------------------------------------------------------
Summary:
Value1Total | Value2Total | Value3Total | ...
--------------------------------------------------------
Value*:
dbcalc, double
timing: Calculate on traversal, reset on reportEnd
Value*running: (not visible)
dbcalc, double
timing: Calculate on Group(1) Start, reset on reportEnd
oncalc: Value := value + Value*.value
Value*Total:
dbcalc, double
timing: Calculate on traversal, reset on reportEnd
oncalc: value := Value*running.value
This discussion has been closed.
Comments
I assume that rather than DBCalc components as you mention below, you are
using TppVariable components. To calculate a grand total, you should not
need three variable components.
1. Place a single TppVariable component in the summary band set to
calculate on Traversal. In its OnCalc event, sum the field value
directly...
Value := Value + Report.Datapipeline['MyField'];
2. Simply place a DBCalc component inside the summary band set to SUM the
given field.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com