Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: suppress if formula help Post Reply Post New Topic
Author Message
lsinger
Newbie
Newbie


Joined: 06 Dec 2012
Online Status: Offline
Posts: 6
Quote lsinger Replybullet Topic: suppress if formula help
    Posted: 14 Aug 2013 at 5:11am

Hi. I'm creating a report that has a data field in it that I would like to have a value suppressed if it = 1, but have the data field value be displayed if it is <1.

I tried...
if {table.field} = 1 then " "
else {table.field}

not working. anyone with a quick fix?

thanks in advance!!!
IP IP Logged
praveeng
Senior Member
Senior Member
Avatar

Joined: 11 Jul 2011
Online Status: Offline
Posts: 165
Quote praveeng Replybullet Posted: 14 Aug 2013 at 5:20am
Hi,
 
Do you want to suppress that Data field in the report?
If Yes, then
Right click on the data field and select Format field.
Select Common tab > Suppress
Then click on (X-2) button beside the suppress option
then it will open a formula window, write the logic as
 
if {table.field} = 1 then true.
 
HTH
 
--Praveen G
Praveen Guntuka,
praveen_guntuka@yahoo.com
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 14 Aug 2013 at 5:22am
If you are trying to display all values which are not equal to 1 then you can filter records through record selection formula.

If you want to display all records and wherever it is 1 you want to display space ' ' then you can use the below formula.

if {table.field} = 1 then " "
else Totext({table.field})

Or you want to suppress the records where it is 1. Then go in section expert and select the respect section and use suppress formula like.

if {table.field} = 1 then true else false
Thanks,
Sastry
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.031 seconds.