You can calculate the sum of the amount inside a subreport at the end of the main report by using TppVariable components. Simply place an invisible TppVariable inside the detail band of the subreport, and another TppVariable in the Summary band of the main report. Then in the OnCalc event of the first TppVariable, update the value of the second TppVariable with the current sum. Something like the following...
Comments
You can calculate the sum of the amount inside a subreport at the end of the
main report by using TppVariable components. Simply place an invisible
TppVariable inside the detail band of the subreport, and another TppVariable
in the Summary band of the main report. Then in the OnCalc event of the
first TppVariable, update the value of the second TppVariable with the
current sum. Something like the following...
procedure TForm1.variable1Calc(Sender: TObject; value: Variant);
begin
Variable2.Value := Variable2.Value + Report.DataPipeline['Amount'];
end;
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com