Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Supress Subreport Section Post Reply Post New Topic
Author Message
khyulitz10
Newbie
Newbie


Joined: 11 Aug 2011
Location: United Kingdom
Online Status: Offline
Posts: 24
Quote khyulitz10 Replybullet Topic: Supress Subreport Section
     Posted: 03 Oct 2011 at 5:54am
Hi all!
 
I have created a sub report for Miscallenous charge and it pulls out the results I wanted and placed it in the Report section. But how do I suppress this section if there is no Miscellaneous charge at all? I just want it to display only if there is a Misc Charge and suppress if there's none..Please help..This is the only thing I need to do and I'm totally done..Anyone please????
 
Thanks!!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 03 Oct 2011 at 6:01am
If the subreport is in its own section in the main report you can suppress the subreport output when it ='0' then in the section expert in the Main report "suppress blank section" as TRUE

Edited by DBlank - 03 Oct 2011 at 6:01am
IP IP Logged
khyulitz10
Newbie
Newbie


Joined: 11 Aug 2011
Location: United Kingdom
Online Status: Offline
Posts: 24
Quote khyulitz10 Replybullet Posted: 03 Oct 2011 at 6:16am
Thanks again DB!
 
Do I right click on the subreport output, Format Field -> Tick "Suppress" box and then place the formula in there? the subreport is called "POLineMiscCharge".
 
POLineMiscCharge = '0'
 
Sorry didn't quite I understand that bit..
IP IP Logged
khyulitz10
Newbie
Newbie


Joined: 11 Aug 2011
Location: United Kingdom
Online Status: Offline
Posts: 24
Quote khyulitz10 Replybullet Posted: 03 Oct 2011 at 6:17am
Originally posted by DBlank

If the subreport is in its own section in the main report you can suppress the subreport output when it ='0' then in the section expert in the Main report "suppress blank section" as TRUE
 
And yes the subreport is in its own section in the main report.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 03 Oct 2011 at 6:24am

In the subreport itself I assume you currently have only 1 field that is not suppressed (the value that ends up appearing in the main report). I also assume you want it suppressed if it = 0.

In the subreport itself conditionally suppress the field
right click on it,
select format field
select common
select formula (x-2) next to suppress
put your consition here
currentfieldvalue=0
IP IP Logged
khyulitz10
Newbie
Newbie


Joined: 11 Aug 2011
Location: United Kingdom
Online Status: Offline
Posts: 24
Quote khyulitz10 Replybullet Posted: 03 Oct 2011 at 11:15pm
To make it clearer, I pasted the screen shots in to here.
I have several fields in my subreport..
 
 
I right clicked on the "Misc.DocMiscAmt" (It is the sum of the Misc charge) and put the currentfieldvalue=0 
 
 
This is where I put this in the main report...
 
 
In Report Footer a section expert..Ticked the "Suppress Blank Section" and typed in "TRUE".
 
 
If there's a Misc charge, this is how it looks like when I preview the subreport....
 
 
After putting the formula, the info disappears but not the section..Don't know where I did wrong??? :(
 
 
 
UPDATE:
 
 Problem solved! Thanks DB! Wink
 
 
 


Edited by khyulitz10 - 03 Oct 2011 at 11:38pm
IP IP Logged
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