Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export Crystal Report to PDF without opening report 1

Status
Not open for further replies.

jpember

Programmer
May 1, 2002
21
ZA
Hi there

Please could you assist me. I'm trying to use the craxdrt.dll to export an existing CR report to a file in PDF format. So far my code looks like this:

Dim crxApplication As New CRAXDRT.Application
Dim crxReport As New CRAXDRT.Report

Public Sub ExportToPDF()

Set crxReport = crxApplication.OpenReport(App.Path & "\Reports\OL - CODA Suspense Journals.rpt")
With crxReport
.ExportOptions.FormatType = crEFTPortableDocFormat
.ExportOptions.DestinationType = crEDTDiskFile
.ExportOptions.DiskFileName = App.Path & "\Reports\OL - CODA Suspense Journals.pdf"
.ExportOptions.PDFExportAllPages = True
.EnableAsyncQuery = True
.Export
End With
End Sub

But when it gets to the .Export bit, it prompts me for the output format again, as well as the number of pages to output. When I reply to the prompts, the export works fine. However, this process is going to run on a batch process server which does not allow user intervention, so I really need to switch off the prompts.

Would be grateful for any help.

Thx,
Jacqui
 
Hi Jacqui,

Try crxReport.Export False.
You may also want to check thread149-250445.

Success,

Herman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top