Formating numbers in Crystal reports
Hi
I've got a view created for a subreport.
There are a few columns that display decimal values ( Like 100.00, 17.00, 1.25)
If the value after the decimal place is 00, they don't want it to be displayed.
So 100.00 would be 100 and 1.25 would be the same: 1.25
How could that be done?
Thanks!
Re: Formating numbers in Crystal reports
Create the following Formula and display it instead of the Database field.
Code:
if {TableName.DecimalFieldName} mod Int ({TableName.DecimalFieldName}) = 0 then
totext({TableName.DecimalFieldName},0)
else
totext({TableName.DecimalFieldName},2)
Re: Formating numbers in Crystal reports
Thank you! It was one of those last minute "wish it would..." things.
Cheers