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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add totals from 2 different Sub-Repors

Status
Not open for further replies.

pleashelp

Technical User
Feb 27, 2002
97
US
Using CR 8.5 I have a total formula in each of 2 sub-reports. Now I need to add those two sub-report totals in the main report. How do I do this?
 
You'll want to create formulas in each subreport which pass the values to the main report.

This is done using shared variables, as in:

whileprintingrecords;
shared numbervar Sub1Sum := sum({table.value});

Do this for both subreports using different names for the variables

In the main you can use it as in:

whileprintingrecords;
shared numbervar Sub1Sum;
shared numbervar Sub2Sum;
subsum1+subsum2

Keep in mind that you have to reference the subrepoort value in a section after the subreport has run.

-k
 
Hi k

Is there a way to determine that the formula in the main report will run only after the rest of the report had run already?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top