×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Help: Summing a group field

Help: Summing a group field

Help: Summing a group field

(OP)
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.

RE: Help: Summing a group field

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

RE: Help: Summing a group field

(OP)
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

RE: Help: Summing a group field

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close