Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sub reports

Status
Not open for further replies.

jveglia

MIS
Mar 26, 2001
13
US
In crystal reports 8.5, Is it possible to add a total from the main report with a total from a sub report that is linked? Neither total comes from the same table.
If yes, what are the steps to create?

Your help is greatly appreciated.

john
 
Yes. You need to set up a shared variable in the subreport like:

whileprintingrecords;
shared numbervar sumsub := sum({table.amt});

You have to place the formula in the subreport report footer and then create another formula in the main report that references it, as in:

whileprintingrecords;
shared numbervar sumsub;

sumsub + sum({mainrpt.amt})

The above calculation formula would need to be placed in a section below the one in which the subreport was executing. You probably need to share what your main report groups are, how you are linking the sub to the main report, and where the sub is located in the main report.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top