report with multiple subreport question

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
 
D

Douglas J. Steele

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.
 
M

Mark Andrews

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
 
S

Steve

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
 
D

Dirk Goldgar

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.
 
D

Dirk Goldgar

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.
 
M

Mark Andrews

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
 

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