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

Number sorting 2

Status
Not open for further replies.

buckslor

IS-IT--Management
Sep 6, 2011
11
0
0
US
Hi all

I'm trying to sort numbers in crystal report xi but having problems getting it to sort correctly. I have aisle numbered from 1 - 300. For example, I need to sort aisle 5, 54, 80, 128 and 208.

It should sort the records like this
5
54
80
128
208

but instead it's sorting it like this
128
208
5
54
80

Is there a formula to use to add 2 zero's to a single digit number to have aisle 5 display as "005" and add a zero to 2 digit aisle to have aisle 54 display as "054"? that may help with the sorting.

Any point in the right direction would be appreciated.

Kind Regards
 
Use a formula like this for sorting purposes only:

totext(val({table.aisle}),"000")

You can add the original field to the report though.

-LB
 
Thanks TeyBrady and lbass - both formulas work great. I just couldn't figure out how to do it.

Many thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top