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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing Multiple Reports on the same page

Status
Not open for further replies.

Noel2

Technical User
Jan 16, 2003
69
US
Hey All!

I have multiple reports that I would like to have on the same page. I already know how to collate the reports and then have them print out, the problem that I am having is that each report prints out on its own seperate page. Please let me know how to do what I need. Below is how I am getting the reports collated and printed. There has to be a way to just have the collation of the reports be continuous on the same page:

created the function in a module below (all from Microsoft's Access Report Samples):

'**********************************************************************
'NumPages is the number of pages in the largest report. If one report
'has fewer pages, the DoCmd Print statement for the smaller report runs
'correctly and no additional pages are printed.
'**********************************************************************

Function CollateReports(NumPages, Rpt1 As String, Rpt2 As String)

'Example
'?CollateReports(2,"Rpt How To Print a Constant Number of Lines","Rpt How To Print Line Number for Each Record/Group on Report")

Dim MyPageNum As Integer

' Set the page number loop and alternate printing the report pages.

For MyPageNum = 1 To NumPages

' NumPages is the number of pages to print.

DoCmd.SelectObject A_REPORT, Rpt1, True
DoCmd.PrintOut A_PAGES, MyPageNum, MyPageNum
DoCmd.SelectObject A_REPORT, Rpt2, True
DoCmd.PrintOut A_PAGES, MyPageNum, MyPageNum

Next MyPageNum

End Function

Then call the function using the following:

CollateReports(2,"Rptnm1","Rptnm2")

Please let me know if you guys have an answer.

Thank you,
Noel
 
Create another report (main), then take the other reports that you want on one page and add them in the detail section as subreports. I will usually make the height of each subreport in the report design fairly small (.20) and the Can Grow property to Yes. If there are many subreports, you can also add a page break in between to force what reports are shown together on each page.

From code, you can then just print the main report which will print all of your subreports the way you want them.



 
I am having real problems with this... what the main goal of this is to produce a report like an excel file that I have. Would you mind if I sent you a copy of the file over e-mail and see if it is possible to create a report with subreports to look like it? Please let me know.

Thank you,
Noel
 
I'll take a look at it. Email to RobCPA_TekTips@hotmail.com. It will need to be in Access or Excel 97.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top