Print Page | Close Window

suppress if formula help

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=19885
Printed Date: 28 Apr 2024 at 6:56pm


Topic: suppress if formula help
Posted By: lsinger
Subject: suppress if formula help
Date 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!!!



Replies:
Posted By: praveeng
Date 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


Posted By: Sastry
Date 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



Print Page | Close Window