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

Conditional Sum within a Group

Status
Not open for further replies.

yunvme

Technical User
May 4, 2010
5
CA
I have a crystal report that is linked to a stored procedure. in the crystal report i have the groups set to customer, date and rank. in the stored procedure i have created a rank where a customer exists more then once on the same day. what i need to do is create a sub total for the customer where there are multiple entries for the same day.
for example:
date Customer Rank Amnt Mileage
3/1/11 1 1 10 10
3/2/11 2 1 15 15
3/1/11 3 1 5 10
3/1/11 3 2 2 10
cust 3 sub total: 7 20

I have tried the running total and only get the first total but not both added togehter. i also tried a sum by group with the same results or everything for the same day is added together.

thanks in advance
 
You should right click on the fields (in the detail section) you want to sum->insert summary->sum and choose the customer group level.

-LB
 
Sorry--if it is the same date within the customer group, then you should insert the summary at the date group level. This will be nested within the customer group, so will reflect the total for that date for that customer.

-LB
 
Thanks LB..it worked like a charm :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top