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!

sub totals

Status
Not open for further replies.

moonknightt

Programmer
May 7, 2002
92
US
I have a report that is in this format

orgid ClientNumber client amount
6 1 $2000
6 2 $6000
6 3 $8000
6 4 $3655
6 5 5635
6 6 $8000
6 7 $10000
6 8 $9700
6 9 $5988
6 10 $300
6 11 $82555

I need to take the sum of the first 5 and then the sum of the rest of them sothat the report looks like this

orgid ClientNumber client amount
6 1 $2000
6 2 $6000
6 3 $8000
6 4 $3655
6 5 $5635
total of first 5 $25290
6 6 $8000
6 7 $10000
6 8 $9700
6 9 $5988
6 10 $300
6 11 $82555
total of rest $116543

Does anyone know how i could get this done


 
You need a Top N report, with N=5 and include others in a single group called others.

In order to do a Top N you must use grouping. If the data in your post represents individual records, just group this data by ClientNumber and then click on Report, TopN/Sort Expert, and make your topN report Software Training and Support for Macola, Crystal Reports and Goldmine
251-621-8972
dgilsdorf@mchsi.com
 
but if i do that how can i get it to be in this format

I need to take the sum of the first 5 and then the sum of the rest of them sothat the report looks like this

orgid ClientNumber client amount
6 1 $2000
6 2 $6000
6 3 $8000
6 4 $3655
6 5 $5635
total of first 5 $25290
6 6 $8000
6 7 $10000
6 8 $9700
6 9 $5988
6 10 $300
6 11 $82555
total of rest $116543


where i still have the individual clinet number displayed...Each client number can have different amounts like



6 1 $2000
6 1 $6000
6 1 $8000
6 1 $3655
6 1 $5635
6 2 $2000
6 2 $6000
6 3 $8000
6 3 $3655
6 5 $5635


Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top