Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to suppress Group Header if Sub-report is Suppressed 1

Status
Not open for further replies.

jj1576

MIS
May 21, 2008
69
US
Hi,

In a my report, I've been able to suppress the subreport based on a specific formula returning false. I also want the group header in the main report to be suppressed when this is the case- I can't seem to make it work... would this be solved by somer kind of variable?
 
did you try supressing the groupheader in section expert
 
yeah.... I tried using a booleanvariable to do that- basically saying that if the result is false, as it is in the subreport (which is where I declared the variable) then to suppress it, but for some reason it won't work.
 
Please show us the formula(s) you used to suppress the subreport, and tell us where they are located. Also tell us in what group section the subreport is located and identify the group section you want to suppress based on the sub being suppressed.

-LB
 
The subreport is being supressed by this formula if the formula is false.

shared booleanvar daysleft:=

if {@DaysLeftTo0} < 15 and {ProbeType.ProbeTypeDescription} = "Inventory" then True else False

The formula is in the report footer of the subreport. The group section in the main report I want supressed is the whole group header 3a, which contains a bar chart and some text objects.
 
my bad... forgot about that- the subreport is in group header 3a, same as the chart and text objects.
 
I think you will have to insert another group header section and drag it to make it the new section GHa, where you will add the subreport again. This way the shared variable result will be accessible for suppressing GHb (where the original sub, charts, etc., now are). Within the sub in GHa, suppress all sections (but NOT the sub itself), and also format the sub (format subreport->subreport tab->check "suppress blank subreport"). Then also go into the section expert and check "suppress blank section" for GHa. This will cause the GHa to disappear without affecting the shared variable. You can then go into the section expert of the main report->GHb->suppress->x+2 and enter:

whileprintingrecords;
shared booleanvar daysleft;
daysleft = false //note no colon

-LB
 
Thanks- that did the job, but created a small problem in that adding the subreport a second time in GHa (I needed to leave the original because it had results that I wanted to show up in the report) created spaces where the supressed results would be. I shrunk the subreport as much as I could and suppressed the section as you suggested, but it still adds a little space- any way to get rid of this?
 
If you followed the steps correctly, GH3a would not appear at all. And if you used the formula on the GHb section, then the GHb section should be suppressed (no blank space). So try again, or recount the exact steps you took. Also identify which report section is showing space.

-LB
 
must have somehow missed the suppress blank subreport part- that did it... Thanks again!
 
How to suppress group header 1 if group header 2 is empty(no records under GH2) . Detail section is completely suppressed
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top