Posted 6 April 2020, 8:42 pm EST
Hi Latha,
There is no direct way to merge the resultant Pdf files. However, you can achieve your requirement by appending multiple reports to VSPrinter and then use VSPDF object to convert the VSPrinter document to a single PDF file.
'Loading multiple reports and rendering them as VSPrint files .vp
Private Sub cmdMerge_Click()
vsr.Load App.Path & "\\Tricky.xml", "Employees" 'vsr= VSReports
vsr.RenderToFile App.Path & "\\vsprint1.vp", vsrVSPrinter
vsr.Load App.Path & "\\Tricky.xml", "Products"
vsr.RenderToFile App.Path & "\\vsprint2.vp", vsrVSPrinter
vsr.Load App.Path & "\\Tricky.xml", "Order Report No Params"
vsr.RenderToFile App.Path & "\\vsprint3.vp", vsrVSPrinter
End Sub
Now after rendering multiple .vp files, we need to merge them into a single VSPrint document.
'Appending multiple .vp files to VSPrint document
Private Sub cmdGen_Click()
vp.LoadDoc "vsprint1.vp", 1
vp.LoadDoc "vsprint2.vp", 1
vp.LoadDoc "vsprint3.vp", 1
End Sub
Rendering VSPrint doc to PDF using VSPdf:
'Rendering VSPrint Doc into PDF
Private Sub cmdGen\_PDF\_Click()
vsp.ConvertDocument vp, App.Path & "\\new.pdf" ' COnverting VSPrint into VSPdf
End Sub
Thanks,
Pragati