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

Totaling from 5 subreports?

Status
Not open for further replies.

petrovlis

Programmer
Jan 15, 2002
114
NL
I have report,with five subreports,each subrep having formula fields:
@Tot1 , the second @Tot2 , the third @Tot3 etc etc.

How can I make a Grand Total of all the five as a
field outside the subreport ??

Thanks for any help.
William
 
You need to use shared variables to total subreport amounts in the main report.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
In the subreports use:

sub1
whileprintingrecords;
shared numbervar v1:= <your formula>

sub2
whileprintingrecords;
shared numbervar v2:= <your formula>

etc.

Then after all of the subreports have run (meaning a section afterwards), use a formula of:

whileprintingrecords;
shared numbervar v1;
shared numbervar v2;
shared numbervar v3;
shared numbervar v4;
shared numbervar v5;
v1+v2+v3+v4+v5

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top