Print Page | Close Window

Conditional Suppression based on Boolean Value

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=19529
Printed Date: 04 May 2024 at 12:55pm


Topic: Conditional Suppression based on Boolean Value
Posted By: adavis
Subject: Conditional Suppression based on Boolean Value
Date Posted: 13 May 2013 at 5:15am
Hello CR users.

I am trying to find a way to suppress a detail section based on a boolean value. What I would like to do is have an entire section be suppressed if the boolean value is false. Is there a way to do this? I tried tooling around with If/Then/Else statements, but since "suppress" does not appear to be a function, I am lost.

Tips appreciated.
Thanks!



Replies:
Posted By: kevlray
Date Posted: 13 May 2013 at 5:29am
Yes in the section expert, look for the formula button for suppress (remember a true suppresses the section.


Posted By: adavis
Date Posted: 13 May 2013 at 6:01am
Thanks. I figured out how to make it work there. For any other newbies who reads this and are curious about the same thing, here is the fix I came up with.

I selected all the fields in the detail section I wanted conditionally suppressed, right clicked and selected format field. Under the common tab, I opened the suppression formula window and entered the conditional suppression statement for the boolean field I wanted the conditional suppression based on (ex: {xfield}=true). Then I went to the Section Expert and clicked the suppress blank section button for the details section I was interested in.

Now when the boolean field returns a true result, the entire detail section is suppressed.

I'm not sure if this is the most efficient way to achieve the result I was looking for, but it worked!


Posted By: kevlray
Date Posted: 13 May 2013 at 7:19am
You should have been able to put the same formula in the section expert, suppress formula area.  Which is more efficient? I have no idea.


Posted By: adavis
Date Posted: 13 May 2013 at 7:56am
Yeah that would have been easier! lol Live and learn. Thanks kevlray!



Print Page | Close Window