Print Separate pdfs for each Tab??

Hey Gurus,
Does anyone know how to print a multitab BO full client (v5+) report so that each tab prints out as a separate pdf file?

Via BCA?

:confused:

Enquiring minds want to know …

Thanks in advance,
Tom


tomattm :canada: (BOB member since 2003-07-31)

Do you want to print or save the report as seperate pdf files ? Not sure what you mean by printing seperate pdf files.


Michele Pinti (BOB member since 2002-06-17)

Wanted to print a pdf for each tab (or report) in a BO file (.rep).
Here’s a Macro solution:

Sub MultiplePDFs()
'Creates a pdf for each tab in a report

    Dim Doc As Document
    Dim Rep As Report
    Dim i As Integer
    Dim l As Long
    Dim VarA As String
    Dim VarB As String
    Dim RepName As String
    Dim Direct As String
    Set Doc = ActiveDocument
    
 'Change the Directory Path here:
    Direct = "c:\BOReports\"
    VarB = Right(Direct, 1)
    If VarB = "\" Then
        For i = 1 To Doc.Reports.Count
            Set Rep = Doc.Reports.Item(i)
            VarA = Right(Rep.Name, 1)
            If VarA = "." Then
                RepName = Left(Rep.Name, (Len(Rep.Name) - 1))
            Else
                RepName = Rep.Name
            End If
        Rep.ExportAsPDF (Direct & RepName)
        Next i
    End If
End Sub

Thanks !

[Used bbc CODE formating for better readability - Andreas]


tomattm :canada: (BOB member since 2003-07-31)

The macro sample doesn’t print the pdf it saves it to a file
Rep.ExportAsPDF (Direct & RepName)


Michele Pinti (BOB member since 2002-06-17)