Supress an Entire Subreport

G

Guest

Is it possible to supress an entire subreport in a report, based on a field
in the underlying query of the subreport being null?

I have an extremely complex report about schools in my district that
contains many subreports. Some of the schools do not need some of the
subreports. I know how to hide text boxes with code using their format event.
Ideally, I'd like the main report to completely bypass the null subreports,
leaving no gaps or white spaces in the main report.
 
D

Duane Hookom

Generally if you can get the "value to check" in the subreport, you can get
it into the main report where you can evaluate it and set the subreport to
invisible.
 
G

Guest

Duanne,

Thanks for your quick reply, and helpful encouragement.

I'm sure I can get that value, because I'm already setting the control in
the subreport to invisible if it's null.

So where should I set up the code to supress the subreport now? Maybe on the
main report's fromat event?

And will that make the subreport go away completely, or just make it
invisible?

Thanks again,
Wes
 
D

Duane Hookom

I was expecting you could include the "value to check" in the main report's
record source.
 
G

Guest

I added the field in question to my main report (but set it to invisible,
since I didn't want to see it there), then added the code to make the
subreport invisible if that field was null. Worked great. Thanks again.
 
C

Chi

Hi Duane,

I have the same question, Supress an entire subreport, However, I don't know
much about the coding. Please give me more detail.

Thank you
Chi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top