Print Page | Close Window

Suppress Section

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=812
Printed Date: 10 May 2024 at 8:20pm


Topic: Suppress Section
Posted By: sandy
Subject: Suppress Section
Date Posted: 07 Jun 2007 at 11:54am

I  added 2 subreports in their own group footer sections on the detail page.

One subreport should print if they are a resident and the other if there are not a resident.
 
Within the section expert of each group footer section, is this where I want to add a formula to suppress or print that section?
 
would this be the formula?  Reason is I get that it must return a boolean
if (tablename.field) =
then
formula = False
else
formula = True
end if
 
thanks so much!



Replies:
Posted By: BrianBischof
Date Posted: 07 Jun 2007 at 12:50pm
You already got it figured out! In the section expert there is a Formula button (X-2) that lets you conditionally suppress the section. Just put the formula you listed here in it (and include the actual string for 'Resident'). This is Crystal Syntax.
if (tablename.field) ="Resident" Then
    False
else
    True;


-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: sandy
Date Posted: 08 Jun 2007 at 7:16am
Yes!  Thanks for quick response.  Not sure though how you link it.


Posted By: BrianBischof
Date Posted: 08 Jun 2007 at 10:59am
Read my free chapters online. I walk you through it there.


-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: MythMosy
Date Posted: 03 Mar 2008 at 6:01am
Hi,
I am having the same problem... I used the same formula & it isnt working for me ...
 
Plz help...


-------------
Thx,
Mythili


Posted By: sandy
Date Posted: 03 Mar 2008 at 8:11am
Did you place the formula at the group level?  This is what I did to print the residential section if resident  (apply a suppress formula at the Group level (right click on GF1a or whatever group you have that section in)

 

For Non-resident

if {APBLDG.WORKTYPE} = "NEWNRS"  Then

 false

Else

 true;



Posted By: MythMosy
Date Posted: 03 Mar 2008 at 9:55am
Thx for the reply..
Actually I solved it myself in a different way....
 
For example,
if I want to suppress the section if worktype is 'NEWNRS', then I typed
{APBLDG.WORKTYPE} = "NEWNRS"  in the suppress formula...
I didnt use if-else condition & in section expert, It is not mandatory to select the suppress checkbox...
 
It works perfectly.....
 


-------------
Thx,
Mythili


Posted By: anandjnf
Date Posted: 20 Jun 2009 at 3:11am
thanks a lot. It worked for me also rahter than using if..else



Print Page | Close Window