Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Decimal issue Post Reply Post New Topic
Author Message
Pirrus blue
Newbie
Newbie
Avatar

Joined: 02 Aug 2011
Online Status: Offline
Posts: 6
Quote Pirrus blue Replybullet Topic: Decimal issue
     Posted: 16 Aug 2011 at 4:44am
Hi
 
I have written an invoicing report that displays the amount of interest acrued after the due date.
 
The issue I have is with the formatting, would it be possible to display the number to 2 decimal points to anything above 0.0099 and to 4 decimal points to anything that is 0.0099 or less.
 
For example i don't want £45.00 to be displayed as £45.0000 and i dont want £0.0005 to be displayed as £0.00.
 
Is this possible?
 
Cheers
 
P
IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 16 Aug 2011 at 4:55am
You can edit the decimal spaces and decimal rounding of a number field in Format Field>Number(tab)>Customize. From there you can create a formula with your requirements for how it displays and rounds decimals.
|< /\ '][' ( )
IP IP Logged
Pirrus blue
Newbie
Newbie
Avatar

Joined: 02 Aug 2011
Online Status: Offline
Posts: 6
Quote Pirrus blue Replybullet Posted: 16 Aug 2011 at 5:03am

Thanks for your response.

Could you let me know what formula would achieve this effect?

cheers

 

IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 16 Aug 2011 at 5:49am
if {table.field}>.0099 then 2
    else 4
|< /\ '][' ( )
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum