|
-
Sep 24th, 2008, 03:59 PM
#1
Thread Starter
Hyperactive Member
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!
-
Sep 25th, 2008, 11:31 AM
#2
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)
-
Sep 26th, 2008, 12:13 PM
#3
Thread Starter
Hyperactive Member
Re: Formating numbers in Crystal reports
Thank you! It was one of those last minute "wish it would..." things.
Cheers
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|