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

Sort String with Alpha and Numeric Values 1

Status
Not open for further replies.

dutchy0513

IS-IT--Management
Jan 31, 2007
16
US
In Crystal XI, I have a column that includes 1 or 2-digit numbers, multiples of same separated by comma, and ALL.
Field is string. Need to sort numerically, then alpha. Alpha is at the end, but the numbers are in wrong order, i.e.:
1
2
20
3
34
All

Found help for numeric to string, but nothing references reverse. Everything I have tried failed. I can add leading 0s, but results are same. Cannot change the field ToNumber. I get error THE FORMULA RESULT MUST BE A STRING.

Any help would be appreciated!
 
synapsevampire
-Re: "alpha is at the end": is a reference to some of the entries in the line item sequence field having an alpha character after the numeric characters.
-Thank you for your note on mixed characters. I did some further checking with the lbass formula, saw the results, then switched to yours.
-Thorough should be expected. You are right though, not everyone is concerned with making sure their work is completely correct. I have been told I am too anal. If that's the worst I hear, I guess I am okay.
T
 
is you prob solved. if not u can just use this simple formula instaed.

space(64-length({tab1.fld1}))&{tab1.fld1}
where tab1.fld1 is ur fieldname.

i use this for my sorting in reports which have alpha numeric values.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top