Link to home
Start Free TrialLog in
Avatar of iaintarr
iaintarr

asked on

Hide Main section in Crystal report if the Sub Reports are empty

I would like to know how to hide the main section in a report based on the sub reports not having any data to display.
ASKER CERTIFIED SOLUTION
Avatar of bdreed35
bdreed35
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mike McCracken
Mike McCracken

That works if the main section is empty.

You need to get the result from the subreport before the section you need to suppress otherwise the section has already started to display and can't be suppressed except in the case of suppressing a blank section.

Is there a query that will determine if the subreport will be empty?

mlmcc
Avatar of iaintarr

ASKER

No. I am talking about the main detail section in the main report, this section has two sub report detail sections, each with a sub report in them.
I can suppress the subreport detail sections if they do not contain data, but if both sub reports are supressed due to not having data in them, i would like the main detail section, which they fall under, in the main report to be suppressed.
mlmcc, the query is the one way i have done it, but would rather have less of a noose around the queries neck.
Was just wondering if there is indeed a way to supress the main section based on the sub reports
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
i shall do the shared variable approach, see what happens.
Forced accept.

Computer101
EE Admin