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!

How to sort records depending on group results

Status
Not open for further replies.

Almie

Technical User
Nov 28, 2006
39
US
I am using Crystal 10 pulling from a Informix database.

My objective is to sort records depending on the group results.
Table: Party Aging rejects
Group by Object rejects
results1: Object rejects: Rejects from Party aging to Party Name Master table: need to sort by Party Name

results2: Object rejects: Rejects from Party aging to Case master table: need to sort by case status

I would like to sort the results1 records by Party last name and sort the results2 records by case status.



 
It would have been better if you had shown us the actual group instances, but essentially use a formula like this:

select {table.groupfield}
case "groupresult1" : {table.partyname}
case "groupresult2" : {table.casestatus}

Note taht if table.casestatus is a number, you would need to wrap it like this:

totext({table.casestatus},"0000")

...where the number of zeros matches the largest number of integers in the number. Add the formula as a sort field in report->sort records.

-LB
 
That works great.....Thank you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top