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