report with multiple subreport question

  • Thread starter Thread starter Mark Andrews
  • Start date Start date
M

Mark Andrews

Access2007

I have a form that has 10 checkboxes to allow the user to check various
types of analytical reports to be shown or not shown.

I then run a report that has 10 sub-reports and make the sub-reports visible
based on the values of the check boxes. I pass OpenArgs and use those in
code behind the report to make things visible or invisible.

All works well except the total time taken for the report to run. Since
it's running all the subreports (even if they are not visible).

Question:
What's a good way to make INVISIBLE subreports not run or run quickly?
Each subreport is based on it's own query and has different fields and data
etc....
The subreports are not linked on the main report (they all do independent
types of analysis)

Thanks,
Mark
 
Untested, but see whether setting the SourceObject property of each of the
subreport controls to nothing, and only setting it to the proper report name
if you want the subreport to appear.
 
In Report_load it doesn't allow for this property to be changed. Any other
ideas or more specific suggestions?

I can play with it, I just thought someone might know off the top of their
head.

Mark
 
Mark,

Try Report_Open.

Steve
(e-mail address removed)

Mark Andrews said:
In Report_load it doesn't allow for this property to be changed. Any
other ideas or more specific suggestions?

I can play with it, I just thought someone might know off the top of their
head.

Mark
 
Mark Andrews said:
In Report_load it doesn't allow for this property to be changed. Any
other ideas or more specific suggestions?

I can play with it, I just thought someone might know off the top of their
head.


Did you try the report's Open event instead of the Load event? You can do
things in Open that you can't do in Load, but I haven't tried this one.
 
Dirk Goldgar said:
Did you try the report's Open event instead of the Load event? You can do
things in Open that you can't do in Load, but I haven't tried this one.


I've tested this now, and it seems to work.
 
Steve and Dirk,

Thanks guys. I just moved the logic to Report_open and all is well.

Try checking out my other 2 questions (posted all today). Looking for more
help.

Mark
 
Back
Top