How to join several reports into one using vba?

valeryk2000

Registered User.
Local time
Today, 11:14
Joined
Apr 7, 2009
Messages
157
I have several check boxes on the form. Each of them corresponds to a certain report. User can check them in any combinations and click Get Report button. Currently each of the selected report opens separately. My boss want them to open as subreports in one report. Is there any way to do it programmatically (VBA)?

Need your help.

Txs
 
Thanks for the link, not exactly the answer to my question. Note that this is going to be an ad hoc report. So we need to add subreports selected by user to the parent report.
1. Do subreports in the parent report have indices (like items in other controls, say, list box)?
2. Is it possible to use a code smthng like:

ParentReport.AddSubreport MySubReport
 
Going of what you said originally the user ticks the sub reports they want to include in the main report. So if you insert all the sub reports into the main report and set the shrink/grow properties to true. Then by using variables or open arguments set the non selected sub reports .Visible property to False.

That way it will only include the ones that have been ticked.

Example

Code:
Report OnLoad()

Me.SubReports1.Visible = Forms("YourFormName")("YourCheckBoxName")

End Sub

Aircode

David
 
David, using this approach I can hide the report, but I still have a blank page with main (parent) report header and footer. May be I need to change the report design? Currently
1) Main report includes 9 subreports (each of them is a chart)
2) Main report has Page Footer and Page Header (that is shown in each subreports). Main page Report header/footer is suppressed
3) Each subreport is presented with only Detail section (both report and page header/footer are suppressed)
So... what do you think?
Thank you
 
Talking to myself.....
Finally I solved it by removing page brakes and setting page layouts.
 

Users who are viewing this thread

Back
Top Bottom