hello!
I am using CR 9 and have a report that is based off a command. In this report I have created a Sort param that is linked to a Sort formula that looks at two fields and determines which one to sort by after the user has selected from the Sort param. My problem lies in that one field is a number and one is a string.
Currently I am using this as my Sort formula:
Unfortunately, some of the numbers are 5 digit and some are 4 digit. When I convert and truncate the number it looks at the digits in order from the left (ie 56,789 is less than 9,123). Is there a way to get around this?
Thanks in advance for any help you can give!
Boni
Boni J. Rychener
Hammerman Associates, Inc.
Crystal Training and Crystal Material
On-site and public classes
Low-cost telephone/email support
FREE independent Crystal newsletter
800-783-2269
I am using CR 9 and have a report that is based off a command. In this report I have created a Sort param that is linked to a Sort formula that looks at two fields and determines which one to sort by after the user has selected from the Sort param. My problem lies in that one field is a number and one is a string.
Currently I am using this as my Sort formula:
Code:
if {?Sort} = "N" then ({Command.PATIENT})
else
if {?Sort} = "I" then CStr (Truncate ({Command.PAT_NUM}), 0)
Thanks in advance for any help you can give!
Boni
Boni J. Rychener
Hammerman Associates, Inc.
Crystal Training and Crystal Material
On-site and public classes
Low-cost telephone/email support
FREE independent Crystal newsletter
800-783-2269