Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Format Decimal field, hide decimal when 0 Post Reply Post New Topic
Author Message
swallow.pa
Newbie
Newbie


Joined: 26 Apr 2012
Online Status: Offline
Posts: 26
Quote swallow.pa Replybullet Topic: Format Decimal field, hide decimal when 0
     Posted: 04 Oct 2012 at 9:49pm
hi all
I have a report created in crystal report. My problem is on how can I
remove or hide 0 from the value.
say for example if I have this data:
25.00
268.00
58.65
86.00

but i want this value
25
265
58.65
86

i need this data for sum and other

how to solve it
[IMG]smileys/smiley18.gif" align="middle" />
please help me
thanks [IMG]smileys/smiley32.gif" align="middle" /> [IMG]smileys/smiley19.gif" align="middle" />

Edited by swallow.pa - 04 Oct 2012 at 9:56pm
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 04 Oct 2012 at 10:55pm
Hi
 
Right click on the field and go in Format Field--Number Tab--Customize--Number tab again and go in Decimals formula editor and give the following formual :
 
if remainder({DatabaseField},1)>0 then
2
else
0
Thanks,
Sastry
IP IP Logged
swallow.pa
Newbie
Newbie


Joined: 26 Apr 2012
Online Status: Offline
Posts: 26
Quote swallow.pa Replybullet Posted: 04 Oct 2012 at 11:34pm
Thanks dear
I use this code in my report
but it is not work properly in sum field
f



Edited by swallow.pa - 05 Oct 2012 at 12:08am
IP IP Logged
swallow.pa
Newbie
Newbie


Joined: 26 Apr 2012
Online Status: Offline
Posts: 26
Quote swallow.pa Replybullet Posted: 05 Oct 2012 at 12:27am
please help me
it is not work properly in sum field
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 05 Oct 2012 at 1:07am
Please format the sum field also with the above formatting condition.  But need to mention the summary field inplace of actual field i.e.
 
 
If remainder({Tablefield},1) > 0  // insted of this you need to place group level / grand level summary field i.e.
 
if remainder(sum({Tablefield}),1) > 0 then
2
else
0
Thanks,
Sastry
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