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!

Sorting 2

Status
Not open for further replies.

cm80

Technical User
May 3, 2001
85
US
Hi,
I have a small problem. I have a heading section that when printed has 5 headers. "OTHERS" is one of the headings. At the moment it is sorted alphabetically which means that "OTHERS" is fourth of the 5 headings, but I would prefer it to be last. how can i do this please?

If that made no sense, this might help.
The headings are sorted like this at the moment
Boat
Car
Jeep
Others
Van
and I want them sorted so that Others is last!
Thanks in advance
 
This solution would mean that you could alter the database table:

Add another column, something like Sort_Order_Field (type SmallInt). Give all of the records except OTHER a value of 1. Give OTHER a high value like 99.

Then, ORDER BY Sort_Order_Field, Header_Field Brian J. Alves
Terrier Consulting, Inc.
Email: brian.alves@worldnet.att.net
VB / Crystal / SQLServer
 
You could change your headings to "1-Boat", "2-Car" ... and "5-Other"
 
I don't know if this feature is included in your version of CR, but 8.5 allows you to manually order your groups. Just right click on your group header and select "change group", and I believe it will let you choose from "sorted in ascending/descending/specified order". Choose specified and put the groups in whatever order you wish.

One caveat: the groups must be the same from report to report (if it suddenly sees "motorcycles" as a groupname, no telling what it will do).

Hope this helps.

bardley
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top