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

Summarizing shared variable (which was summarized in the subreport!)

Status
Not open for further replies.

rikkiprince

Programmer
Aug 8, 2003
7
0
0
GB
I am creating a summary in a subreport, then sharing this using a shared variable with the main report. Is there any way of then summarizing this shared variable again in the main report, or is it impossible (like summarizing a summary in a normal report)?

Cheers,
Rikki

PS. Using CR8.5 with Raisers Edge database.
 
Create a variable to sum the sum that's returned.

whileprintingrecords;
shared numbervar SubSum;
numbervar SumSum:=SumSum+SubSum

The formula would be used AFTER the subreport fires.

If you want it reset at some group level in the main report, create a reset variable for the group header:

whileprintingrecords;
numbervar SumSum:=0;

Make sure that you reset the subreport shared variable PRIOR to running the subreport also, otherwise you may get the previous value if the subreport doesn't return any rows (the formula doesn't get executed within the subreport).

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top