Tina K
asked on
Cyrstal Reports data type in Case Statement
I've tried just about everything I can think of. The formula below works awesome, however; I would like the default to be 'Quoted' not 0.00 As we all know, CR cannot mix data types. The hr_fromdate, gv_fromdate and cr_fromdate are integers (not date fields, not sure why they were named that way...) Any thoughts on how I can force CR to display a string rather than a number as default? Thanks so much!
whileprintingrecords;
select {@cru}
case "cru hr", "cru hr %" : {Command.HR_FromDate}
case "cru gv" : {Command.GV_FromDate}
case "cru cr" : {Command.CR_FromDate}
default : 0.00
whileprintingrecords;
select {@cru}
case "cru hr", "cru hr %" : {Command.HR_FromDate}
case "cru gv" : {Command.GV_FromDate}
case "cru cr" : {Command.CR_FromDate}
default : 0.00
If you need the numbers as numbers for another formula create the one I modified and use it in the display.
mlmcc
mlmcc
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
@mimcc - the formula works great with the addition of the cstr function, but you're right, I do need the numbers as numbers for another formula. I don't understand what you mean by "create the one I modified and use it in the display" The other formula that uses the result of this formula is generating the error 'the string is non-numeric'.
Thanks!
Thanks!
ASKER
I should add that I did change formula #2 by adding tonumber - still generating the string is non-numeric error
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window
mlmcc