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

Issue with Grouping > Am I on the right track?

Status
Not open for further replies.

themich

Technical User
Jul 15, 2011
9
US
I'm doing a report by employee, pay, hours, dues, vacation.

I'm currently grouping by employee which results in the pay and hours records being duplicated because for every pay week, there are two records for different due deductions.

Will the duplicate hours/pay be removed if I group by all of the about mentioned fields?

I've read everything I could find and this is the only thing I can come up with (although I swear that I tried doing multiple groupings, but I don't think I ever tried to group on all fields).
 
If your report uses table A and table B, then each detail line in a possible combination of A and B.

I can't tell you how to group without knowing which field is on which group. But there are various ways to total that may involve adding just once per group. If Pay and Hours for an employee were on a single record in Table A and dues on multiple records, you could group by employee, sum Pay and Hours just once per grouped employee records but add Deductions without regard for group.

If you're not already familiar with Crystal's automated totals, see FAQ767-6524.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
Grouping can't change the number of records, so if you have 2 records for each check it doesn't matter how you group them. One option is to group by check and use a running total field that is set to evaluate 'on change of group'. That way you have 2 records but your hours total only counts one record per check.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guides to Formulas, Parameters, Subreports, Cross-tabs, VB, Tips and Tricks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top