I am trying to supress a section on a report that contains a sup-report. The problem is I want to conditionally supress it based on the result of the sub-report. Is this possible.
You would have to add the subreport a second time, in a section above the one you want suppressed. So if you want Group Header #1 suppressed and it contains the sub, you would have to insert another GH section, and place a copy of the sub in GH#1a and use a shared variable in the subreport footer that you then pass to the main report to use for suppression purposes.
You can make this GH1a sub "disappear" by suppressing all sections within the subreport, formatting the sub to "suppress blank subreport", removing the borders on the sub, and formatting the GH#1 section to "suppress blank section." As long as you don't suppress the GH#1a section or the subreport object directly, the shared variable will then pass. Then reference the shared variable in the section expert for GH#1b and other sections you want suppressed.
There is one method that works in some situations. It depends on what calculation in the subreport determines if that subreport should be suppressed. If it is a calculation that you can use in the subreport to suppress ALL of the subreport sections, then make all the sections suppress based on that condition.
Once you have that blank subreport you can use
"Suppress blank subreport" and
"Suppress blank section"
in the main report to completely suppress that section.
Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guides to Formulas, Parameters, Subreports, Cross-tabs, VB, Tips and Tricks
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.