Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Suppressing Zero Decimals Post Reply Post New Topic
Author Message
emalbritton
Newbie
Newbie


Joined: 06 Jun 2008
Location: United States
Online Status: Offline
Posts: 3
Quote emalbritton Replybullet Topic: Suppressing Zero Decimals
    Posted: 06 Jun 2008 at 7:44am
I was wondering if there is any way to conditionally suppress decimal formatting on a number field if the decimals are zeros.
 
example...quantity of 7
 
with the decimal formatting set to 2, the displayed number would be 7.00 and I want to just see 7, however, if the quantity is 7.5 that is what I would like to see as well as 7.25.
 
Thanks in advance for any ideas.
 
Emily
IP IP Logged
bhaski
Newbie
Newbie


Joined: 21 Feb 2008
Online Status: Offline
Posts: 2
Quote bhaski Replybullet Posted: 10 Jun 2008 at 3:45am
sure

go thru like this

right click yr numeric field>format editor>number button>below Customize>decimals field>click formula editor

then write this

if (your_numeric_field mod Truncate (your_numeric_field))>0 then 2
else 0

then run

n'joy

IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.047 seconds.