How do I get multiple reports in 1 PDF File

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Peter99
    New Member
    • Jul 2007
    • 10

    How do I get multiple reports in 1 PDF File

    I'm using Access 2007 with the PDF driver installed. I have 2 reports that I want to merge into 1 PDF file. I'm using the following coding:

    Code:
            Set mdbCurrent = CurrentDb
            
            Set Master = mdbCurrent.OpenRecordset(strSQL, dbOpenDynaset, dbSeeChanges)
            
            Do While Not (Master.EOF)
                gDealer = Master!Dealer_Num
                gProv = Master![ST/PROV]
                stDocName = "General_Field_Order"
                
                If gProv = "PQ" Then
                    stDocName1 = "General_MIR_French"
                Else
                    stDocName1 = "General_MIR_English"
                End If
    
                DoCmd.OutputTo acOutputReport, stDocName, "PDFFormat(*.pdf)", "C:\Summer_Maintenance\Test\Test_Dealers1", False, "", 0, acExportQualityPrint
                
                DoCmd.OutputTo acOutputReport, stDocName1, "PDFFormat(*.pdf)", "C:\Summer_Maintenance\Test\Test_Dealers1", False, "", 0, acExportQualityPrint
                
                Master.MoveNext
            Loop
            mdbCurrent.Close
    The result of this is that a pdf file is created containing the last report
    stDocName1.
    What I want for each gDealer is the first report follwed by the second report outputed to a pdf file.
    The resulting pdf file would have dealer 1 - report1 and report2, then dealer 2 - report1 and report2,etc.
    Last edited by debasisdas; Dec 4 '09, 05:48 AM. Reason: Formatted using code tags.
Working...