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

Group Sorting with 2 fields

Status
Not open for further replies.

Deepravs

Programmer
May 17, 2010
7
US
Hi,

I have a group name which should be sorted by 2 fields - COUNT and AMOUNT.

This is because the field COUNT has ties (same number for different groups)

GROUP_NM COUNT AMOUNT
1 9 20
2 4 10
3 4 50
4 4 20
5 2 60

From the above example I need to print GROUP_NM in DESC order of both COUNT and AMOUNT.
 
You insert summaries on each field (count and amount), and then in the group sort expert, select the count summary first and then add the amount summary as the secondary sort at the group level.

-LB
 
but I could not find second level of sorting in Group Sort Expert. I could add only one summary field to it...
 
You must have inserted summaries on each field in the main report--this is what allows the summary to appear as an option in the group sort. After adding the first summary, check the dropdown list to see the second summary.

-LB
 
I could see both the summaries in my drop down list but can add only 1 to it at once(not both)

anyways I made it by adding "order by" clause in the sql command, I was wondering can I do it in Group Sort Expert.
 
You should be able to add one summary and then add the second.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top