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

Specified Order - Formula?

Status
Not open for further replies.

dbaJSmith

Programmer
Joined
Sep 17, 2008
Messages
42
Location
US
Using CR XI.

I'm working on a report that emulates a crosstab (the crosstab cannot perform the calculations I need, so I'm using a three-formula trick to get my numbers). Right now, the group is sorted in original order. I'm 100% sure that I can't sort the rows by the three-formula trick values, since it runs while printing records. However, I'd like to try sorting by specified order using a formula to set the values.

So the main question is, can you perform a specified order sort using a formula? Thanks!
 
Let's say your group field contains instances: "A", "B", "C", and you want them displayed in this order: C, A, B. Create a formula like this:

select {table.groupfield}
case "A" : 2
case "B" : 3
case "C" : 1

Insert a group on this formula and choose options->customize group name->use a field: {table.groupfield}.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top