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!

Help: Summing a group field

Status
Not open for further replies.

Wolffen

IS-IT--Management
Jun 6, 2002
7
0
0
US
Hi. I've been banging my head on the wall for a while on a report and I could use some suggestions. I'm working on a report where I really need to get a summary of a group field, which Crystal won't let you do. Is there any kind of work around for this? Here's some details:

I'm pulling a sub-total of two fields in my details into my group section. I then have a formula field that calculates a value off of those sub-totals. I need to add up the formula values for each occurrence of the group in the report. Is there a way to do this? For a little more detail, I'm grouping by customer, and calculating commissions based on the sub-total sales vs cost for each customer. So if my sales guy gets $500 for one customer, and $250 for another, and $250 for a third, I want to be able to print "Total Commission=$1000" at the end of the report.

Any help would be appreciated.
 
I would hold the values of the formula in a variable until the report footer.

So, next to the formula subtotal, have another suppressed formula which says

whileprintingrecords;
numbervar total := total + {@YourTotalField};

in the report footer;

whileprintingrecords;
numbervar total;

Naith
 
God Bless you Sir. Works like a champ. Never played with the WhilePrintingrecords function, and I was curious if that was where I needed to go. You just made my day go from horrible to great (I've been playing with the report for 2 weeks due to numerous changes from management)! Thanks!


Landon
 
Aim to please, old boy.

If you have any problems with this in the future, for heaven's sake man; don't wait 2 weeks! ;)

Naith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top