Get sum from 2 subreports
I have a main report that contains two subreports, I need to create a
summery which I can subtract the sum of one subreport from the other
subreport, problem is I cannot get one to see the sum value from the other,
how do I get that to work I'm not using RAP?
Thanks
Richard
Win 2K Pro
Delphi 7 Pro
Reportbuilder Pro 7.x
summery which I can subtract the sum of one subreport from the other
subreport, problem is I cannot get one to see the sum value from the other,
how do I get that to work I'm not using RAP?
Thanks
Richard
Win 2K Pro
Delphi 7 Pro
Reportbuilder Pro 7.x
This discussion has been closed.
Comments
I would suggest making all your calculations with TppVariables rather than
DBCalc components. Start by replacing the DBCalc components in your
subreports with Variables and calculate their values in the OnCalc events.
Then place another Variable inside the Summary band of the main report and
it its OnCalc, subtract the value of one variable from the other.
procedure TForm1.ppVariable3Calc(Sender: TObject; var Value: Variant);
begin
Value := ppVariable1.Value - ppVariable2.Value;
end;
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com