Print Page | Close Window

Help Needed with Simple Suppression Formula

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=22767
Printed Date: 01 May 2024 at 3:44pm


Topic: Help Needed with Simple Suppression Formula
Posted By: JohnH1976
Subject: Help Needed with Simple Suppression Formula
Date Posted: 30 Apr 2019 at 10:45am
I'm looking to suppress a section when {Table.FIELD} does include the words "Tech Booth Drape Kit".

How do I write this formula?






Replies:
Posted By: DBlank
Date Posted: 30 Apr 2019 at 11:02am
not({Table.FIELD} like "*Tech Booth Drape Kit*")


Posted By: JohnH1976
Date Posted: 01 May 2019 at 12:29pm
Thanks for the suggestion but for some reason it's not working. The section gets suppressed regardless. Any other ideas?


Posted By: DBlank
Date Posted: 02 May 2019 at 2:25am
where are you placing the formula?
what exactly is the formula?
are you dealing with null values?


Posted By: JohnH1976
Date Posted: 02 May 2019 at 1:57pm
This report returns a list of equipment booked for a video production. When the list includes one (or more) of the following:

Tech Booth Drape Kit #1
Tech Booth Drape Kit #2
Tech Booth Drape Kit #3

the report should include an OLE object that resides in the report footer. I'm trying to get the formula to suppress the report footer (and therefore the OLE object) if the list doesn't include one of the drape kits.


Posted By: DBlank
Date Posted: 03 May 2019 at 2:32am
if you place a field level criteria into a header or footer, or an object in a header or footer it is only going to apply the criteria to the first row int hat grouping for a header or the last row in the grouping for a footer.
You need to create a way to make your condition against a report summary.
The easy way is through a sum
create a formula field for this called "flag1" as

if {Table.FIELD} like "*Tech Booth Drape Kit*" then 1 else 0

now sum this formula field for the report
You should see that any time your data set has any of those rows the sum is >0 and whenever it has none of those rows it will be 0. use that as your suppression...
sum({@flag1})=0



Print Page | Close Window