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

Summing a Field that contains a summary field

Status
Not open for further replies.

jtr9999

MIS
Jan 25, 2008
27
US
I was looking at another thread titled "Cannot sum a field calculated off a summary total" to solve my problem but was unable to get it to work.

I have a report that has two groups.
Group 1 = Employer
Group 2 = Investment

I am summing a datatbase field (balance) on Group 2 and Group 1. I have a formula that multipies my Group 2 summary times another database field. I need the sum of that formula for group one.

Sample of what I am looking for.
Bal Exp Rat Formula
Group 2 - Investment 1 10 .2 10*.2=2
Group 2 - Investment 2 20 .4 20*.4=8
Group 2 - Investment 3 30 .6 30*.6=18
Group 1 60 28 - This is the value I am looking for.

 
I do not have crystal in front of me, so apologize if i have any typos or missed something, but maybe something like this:
If i understand correctly, you will need to do a separate set of formulas for the balance sum and the formula.

//{@additup} place in group 2 footer
numbervar manualsum;
manualsum := manualsum + {@Bal}

//{additupdisplay} place in group 1 footer
numbervar manualsum;
manualsum

//{@additupreset} place in group 1 header
numbervar manualsum := 0;
 
Add "whileprintingrecords;" to the beginning of each of the suggested formulas.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top