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

Top 5 Occupations with Greatest total # employees

Status
Not open for further replies.

hsandwick

Programmer
Sep 10, 2001
286
US
Crystal 2008
Oracle 9i
BOXI 3.1

In a subreport, I want to show descending results for the Occupations within a Division that have the 5 greatest total # employees within each Occupation. So:

Division ABC

Occupation Code Sum Total # Employees in Occupation

12345 500
23451 400
34512 300
45123 200
51234 100

I have created groups for Division and Occupation and I sum the # employees under Occupation based on employee unique id.

It seems I can only create TopN = 5 for a group based on a {table.field}. I want to create a TopN = 5 for the sum total # employees within each Occupation, and then present the Occupation and the sum total employees.

Thanks for your suggestions.

 
It sounds like you just need to use topN = 5 and select count of employees on the occupation tab in the group sort expert.

-LB
 
Thank you, lbass!

I was using a "Running Total" for count of employees, which wasn't an option in the occupation tab in the group sort expert for the TopN = 5.

Going back to basics, I just added a "Summary" field to count the employees within the Occupation group, and this was an option for the TopN group sort.

Issue resolved.

-hs
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top