Print Page | Close Window

suppress field based on value of other field

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=12707
Printed Date: 28 Apr 2024 at 8:49pm


Topic: suppress field based on value of other field
Posted By: 00331data
Subject: suppress field based on value of other field
Date Posted: 24 Mar 2011 at 1:23pm
Hi:
 
I want to create a formula that will suppress 2 fields if another field does not = a certain value. 
 
The fields I want to supress are:  'Internal Record Number' and 'Box Number' & whether these fields are suppressed or displayed will depend upon a value in the field called 'Record Type'
 
I tried to create a formula using the Box Number field to begin with:
 
If ({RecordType}='Blue Collection'
or {RecordType}='Yellow Collection'
or {RecordType}='Mixed Media Collection')
     then {BoxNumber}
          else ""
 
I was hoping to supress the field 'Box Number' in the records where 'Record Type' doesn't = Blue Collection, Yellow Collection, or Mixed Media Collection.  However, I can see that it doesn't supress the field, it just makes the value for 'Box Number' blank.
 
What formula would I use if I wanted the 'Internal Record Number' and 'Box Number' values to be displayed only in those records where 'Record Type' = Blue Collection, Yellow Collection, or Mixed Media Collection?


-------------
thanks,
00331data



Replies:
Posted By: DBlank
Date Posted: 28 Mar 2011 at 3:54am
Right click on the 'Internal Record Number' field and select the common tab and then the Suppress formula box
enter the formula for suppression here. It is a boolean formula so it would NOT({table.recordtype} in ['Blue Collection', 'Yellow Collection', 'Mixed Media Collection'])
 
repeat for the Box Number field


Posted By: 00331data
Date Posted: 28 Mar 2011 at 6:35am
Thanks!

-------------
thanks,
00331data



Print Page | Close Window