I have a report that has a group header and fields in the details section. There is also a sub-report in the footer.
Currently, it's returning all the data for those fields. I want to suppress the details in the main report if the subreport has no records. I tried searching online on how to do this and think I might need a shared variable which I'm not too familiar with. The sub-report only has the details section with fields. All other sections are suppressed by default.
I tried using the suppress blank sections already and that doesn't seem to have any effect. I selected that option from the Section Expert from both the main and subreport along with the Format Subreport > Subreport tab.
The next thing I tried was with the shared variable. Maybe I'm not using it correct. I created two formulas:
Formula in subreport footer which is suppressed already
Suppression formula in main report for group header, details and group footer where subreport is. Also tried just putting the formula field in those sections and it just returned True/False. Not sure what the pattern is either because some of them are returning False when there is no data in the subreport while others also return False when there is data.
My report is completely blank aside from my group header if I use the above shared variable in my suppression formula.
Thanks in advance.
Currently, it's returning all the data for those fields. I want to suppress the details in the main report if the subreport has no records. I tried searching online on how to do this and think I might need a shared variable which I'm not too familiar with. The sub-report only has the details section with fields. All other sections are suppressed by default.
I tried using the suppress blank sections already and that doesn't seem to have any effect. I selected that option from the Section Expert from both the main and subreport along with the Format Subreport > Subreport tab.
The next thing I tried was with the shared variable. Maybe I'm not using it correct. I created two formulas:
Formula in subreport footer which is suppressed already
Code:
whileprintingrecords;
shared numbervar showsection;
showsection := 1
Suppression formula in main report for group header, details and group footer where subreport is. Also tried just putting the formula field in those sections and it just returned True/False. Not sure what the pattern is either because some of them are returning False when there is no data in the subreport while others also return False when there is data.
Code:
whileprintingrecords;
shared numbervar showsection;
showsection =0
My report is completely blank aside from my group header if I use the above shared variable in my suppression formula.
Thanks in advance.