Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Give user the choice whether to run subreport

Status
Not open for further replies.

TrekBiker

Technical User
Nov 26, 2010
330
GB
My Invoice report has a subreport that shows details of amounts of unpaid previous invoices.

This increases the time to generate an invoice by a large amount, in one case to about 20 seconds with the subreport, from about 2 seconds without it.

I'd like to give the user the option to show the subreport data or not. How is this best achieved?
 
You can try use a checkbox on a form and then add code to the report section to set the subreport to visible or not based on the checkbox.

Duane
Vevey, Switzerland
Hook'D on Access
MS Access MVP 2001-2016
 
Hi, and thanks. Doesn't make the subreport invisible do just that rather than stopping the subreport loading, even if you can't see it?
 
I'm not sure. You could test it by checking the performance. You could also add a little code to the On Print of a section in the subreport to debug.print something and see if there is anything in the debug window. Please test and report back.

Duane
Vevey, Switzerland
Hook'D on Access
MS Access MVP 2001-2016
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top