I am using version 9 attaching to Oracle through a command object. I am trying to sort the report by Next Date, Zip Code or Employee Name based on the following formula:
if (UpperCase({?SortType}) = 'NEXT DATE') then
ToText({Command.NEXTDATE}, 'yyyyMMdd' )else
if (UpperCase({?SortType}) = 'ZIP CODE') then ({Command.ZIPCODE}) else
if (UpperCase({?SortType}) = 'EMPLOYEE') then
ToText({Command.EMPLOYEENAME})
When I remove the ToText from in front of the date field, Crystal says it is expecting a string there. If I leave the ToText in front of the date, the date will not sort in the correct order. Does anyone know of a way around this? Thanks!
if (UpperCase({?SortType}) = 'NEXT DATE') then
ToText({Command.NEXTDATE}, 'yyyyMMdd' )else
if (UpperCase({?SortType}) = 'ZIP CODE') then ({Command.ZIPCODE}) else
if (UpperCase({?SortType}) = 'EMPLOYEE') then
ToText({Command.EMPLOYEENAME})
When I remove the ToText from in front of the date field, Crystal says it is expecting a string there. If I leave the ToText in front of the date, the date will not sort in the correct order. Does anyone know of a way around this? Thanks!