General information
Title:
Second Report as a second page
The code below serves my purpose well up to a point. I need to geneate a second report to a .pdf and insert it into the first .pdf as a second page. Any ideas or help is appreciated.
Thanks,
Dave
> NOTE: PDF generation (Subdivision)
>
> Local cApprovalNumber, nRecNo, oDistiller, nPdf
> Set Printer To Name 'Acrobat PDFWriter'
> oDistiller = CreateObject('pdfDistiller.PDFDistiller.1')
> Do While !Eof('crsApprReport')
> nRecNo = RecNo()
> cApprovalNumber = Upper(Alltrim(crsApprReport.cApprovNo))
> Report Form 'C:\Vfp6\Approvals\Daves sample\ssubappr.frx' ;
> For Upper(Alltrim(crsApprReport.cApprovNo)) = cApprovalNumber NoConsole ;
> To File Sys(2023) + '\Post Script.ps'
> If File(Sys(2023) + '\Post Script.ps')
> nPdf = oDistiller.FileToPDF(Sys(2023) + '\Post Script.ps', ;
> Sys(2023) + '\' + cApprovalNumber + '.pdf', '')
> Delete File Sys(2023) + '\Post Script.ps'
> If nPdf != 1 Or !File(Sys(2023) + '\' + cApprovalNumber + '.pdf')
> =MessageBox('Problem')
> Endif
> Else
> =MessageBox('Problem')
> Endif
> GoTo nRecNo
> Skip
> EndDo
> Set Printer To Default
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only