Supress an Entire Subreport

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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.
 
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
 
I was expecting you could include the "value to check" in the main report's
record source.
 
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.
 
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
 
Back
Top