To do this nicely you will need to use the SDK either from Adobe or 3rd party vendors.
Here is a quick and dirty way. However, you do need the FULL version of Acrobat, not the reader.
How it works?
The codes below mimic how you would create and save Pdox report in PDF format manually.
Similar to keyboard macros in Excel.
1. Create report
2. Print to screen
3. Use Sendkeys command to mimic File | Print menu commands
4. Type in pdf file name.
5. Done!
How to use the codes?
Create a new script.
Copy and paste the codes below.
Replace:
YourTable.DB
YourReport.rdl
YourPDF.PDF
With your valid names.
Run script!
Good Luck
Joe
; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Var
sPDFWriterDevice String
EndVar
; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Proc SetPrinter(sPDFWriterDevice String) Logical ;Set Printer device driver
Var
arPrinters Array[] String
lFound Logical
PrintInfo PrinterInfo
sPtrData String
siElement SmallInt
EndVar
;Get current output device
PrinterGetInfo(PrintInfo) ;Get Current printer device
If PrintInfo.DeviceName = sPDFWriterDevice Then ;If current output device is PDF Writer, quit
Return True
EndIf
eNumPrinters(arPrinters) ;Get all available printers
lFound = False ;Find PDF Writer device
For siElement From 1 To arPrinters.Size()
sPtrData = arPrinters[siElement]
sPtrData = sPtrData.Upper()
If Match(sPtrData,".."+sPDFWriterDevice.Upper()+"..") Then ;Find PDF device driver
lFound = True
QuitLoop
EndIf
EndFor
If Not lFound Then ;Quit if no PDF Writer device is found
MsgStop("Error","Device "+sPDFWriterDevice+" is not found.")
Return False
EndIf
If Not PrinterSetCurrent(sPtrData) Then ;Set current printer to PDF Writer device driver
Return False
EndIf
Return True
EndProc
; * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
method run(var eventInfo Event)
Var
RptInfo ReportPrintInfo
Rpt Report
PrintInfo PrinterInfo
sPDFWriterDevice String
FS FileSystem
stmpReportTbl String
sReportFile String
sFTPPath String
sPDFName String
EndVar
sPDFWriterDevice = "Acrobat PDFWriter" ;Device name installed on your computer
stmpReportTbl = "YourTable.DB" ;Report Data table name
sReportFile = "YourReport.rdl" ;Report name (delivered)
sFTPPath = "C:\\" ;PDF location
sPDFName = "YourPDF.PDF" ;PDF name
If Not SetPrinter(sPDFWriterDevice) Then ;Set current outpot device to PDF Writer
MsgStop("Error","Cannot set printer device driver.")
Return
EndIf
If IsFile(sFTPPath+sPDFName) Then ;Delete existing PDF file of the same name
FS.Delete(sFTPPath+sPDFName)
EndIf
RptInfo.MasterTable = stmpReportTbl ;Report data table name
RptInfo.Name = sReportFile ;Report name
RptInf

rient = PrintLandscape ;Set paper orientation
Rpt.Open(RptInfo) ;Open report on screen
Sleep(1000) ;Wait for program to catch up
;Initiate key strokes to select File | Print menu options
Sendkeys("{Delay 100}%FP{enter}{Delay 100}"+sFTPPath+sPDFName+"~") ;Save report as pdf
Sleep(1000) ;Wait for program to catch up
Rpt.Close() ;Close report