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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suppress Group Header based on Shared Variable

Status
Not open for further replies.

nicmcd77

Technical User
Oct 11, 2016
17
US
I have a shared variable being passed from my subreport to main report (Lot Number). I am trying to then suppress the Group Header in the main report if there is no Lot Number but it's not working. I assume it's because it processes after the report? Is there any other option?

Formula in Group Header #1 of subreport:
WhilePrintingRecords;
Shared StringVar LOTNUMBER := {SQA_LOTS.LOT_NUMBER}

Formula in Group Footer #1 of Main Report
WhilePrintingRecords;
Shared StringVar LOTNUMBER;
LOTNUMBER;

Section Expert for Suppress in Group Header 1: if isnull({@Shared Lot Number})then true else false

1-27-2017_11-44-53_AM_a9wofq.jpg
 
You are aware that the shared variable will not be assigned until the next section in which the sub-report was called. So if want to have a GH suppressed. You may have a second GH (put your real GH there) and then put the sub-report in the first GH. But it appears that you have the sub-report in the GF, which should have a value for the next GF.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top