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

Running total based off summary values

Status
Not open for further replies.

Luvsql

Technical User
Apr 3, 2003
1,179
CA
I can't believe this isn't really simple. The only thing I can find on the knowledge base with Crystal Decisions is adding a cross tab, then suppressing it.

I have Group 1 and Group 2.

Group 1 I would now like to have a running total of the values in group 2 (Ie Group 1 could have 10 different Group 2 values and need it subtotaled)

Group 2 Sum(Qty from Details), Price $100, CalcField=Sum(Qty)*Price=$2500

Also need this manual running total for the report footer.

My issue is the CalcField is not available in the running total window.
 
You can use variables to do this:

//{@reset} to be placed in the Group #1 header:
whileprintingrecords;
numbervar subt := 0;

//{@accum} to be placed in the Group #2 footer:
whileprintingrecords;
numbervar subt := subt + {@calc};
numbervar gttot := grtot + {@calc};

//{@displaysubt} to be placed in the Group #1 footer:
whileprintingrecords;
numbervar subt;

//{@displaygrtot} to be placed in the Report footer:

whileprintingrecords;
numbervar grtot;

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top