Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Help Needed with Simple Suppression Formula Post Reply Post New Topic
Author Message
JohnH1976
Newbie
Newbie
Avatar

Joined: 28 Jan 2019
Location: United States
Online Status: Offline
Posts: 6
Quote JohnH1976 Replybullet Topic: Help Needed with Simple Suppression Formula
    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?



IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 30 Apr 2019 at 11:02am
not({Table.FIELD} like "*Tech Booth Drape Kit*")
IP IP Logged
JohnH1976
Newbie
Newbie
Avatar

Joined: 28 Jan 2019
Location: United States
Online Status: Offline
Posts: 6
Quote JohnH1976 Replybullet 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?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 May 2019 at 2:25am
where are you placing the formula?
what exactly is the formula?
are you dealing with null values?
IP IP Logged
JohnH1976
Newbie
Newbie
Avatar

Joined: 28 Jan 2019
Location: United States
Online Status: Offline
Posts: 6
Quote JohnH1976 Replybullet 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.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet 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
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.016 seconds.