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 Chris Miller 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.

tonyvee1973

IS-IT--Management
Oct 22, 2009
156
GB
Hi
I have a report which looks like below to check stock, however i need it to sort numerically (ie 1,2,3,4 etc) can someone help me get this sorted? I have tried the group and record sorts but no joy, even tried padding out with zereos but it looks awfull.
Using crystal X1 - Maybe simple but i'm quite a newbie to crystal - sorry :(

acc code qty
1 62514 20
100 62515 11
1001 62525 18

Thanks
Tony
 
Are you referring to the "acc" field? And is this a string? If so, use the following formula as your sort field, but display the actual field on the report:

totext(val({table.acc}),"0000") //add as many zeros as the longest acc

-LB
 
Leave report as is and Use a top N sort based on quantity.

Set N to say 1000 or bigger if required and it will sort all records.

Ian
 
Thanks guys, something so simple eh? :)
Just taking me a while to get used to the formulas etc.

These both worked a treat, thanks very much!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top