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

Re: Calculate a subreports totals

edited December 2004 in General
Greetings,

I have three subreports on a detail band of the main report which runs once.
I have ppVariables setup to do currency totals one on each subreport. I
would like to total all three subreports totals into a grand total in
summary of the report. This is what I have:
header
detail
SBR1
vDoorTotal - Cal:Transveral Reset:ReportEnd
SBR2
vMachCostTotal - Cal:Transveral Reset:ReportEnd
SBR3
vAddCost - Cal:Transveral Reset:ReportEnd
footer
SUMMARY
vGrandTotal Cal:ReportEnd Reset:ReportEnd

You would think that I would be able to access those variables just about
anywhere in the report. When it gets to the calc of the vGrandTotal, all the
other variables are 0's.

procedure TfrmHMDoorSummary.vGrandTotalCalc(Sender: TObject;
var Value: Variant);
begin
ShowMessage(vDoorTotal.AsString);
vGrandTotal.Value := vGrandTotal.Value + (vDoorTotal.Value+
vMachCostTotal.Value+vAddCostTotal.Value);
end;

Anyone see what I am doing wrong.
TA

Comments

This discussion has been closed.