Export Crystal Reports to PDF
I need to export a "rpt file" to PDF.
In my code the report is "created" and then i whant export to pdf whitouth prompt user's. How can i do this??
there is the ExportOptions components with export functionality, how it works?:confused:
code pls...
Best Regard's
Re: Export Crystal Reports to PDF
Set the ExportOptions and then call the Export method...
Code:
With Report.ExportOptions
.DestinationType = crEDTDiskFile
.DiskFileName = strFileName
.FormatType = crEFTPortableDocFormat
.PDFExportAllPages = True
End With
Report.Export False 'false = dont prompt user
Re: Export Crystal Reports to PDF
tks...
it work's. :afrog:
Re: Export Crystal Reports to PDF
If am trying to use tha sane code but it is giving me an error as "Server Not Open".
Code:
Dim appl As New CRAXDDRT.Application
Dim rep As CRAXDDRT.Report
Set rep = appl.OpenReport(App.Path & "\Reports\pro_8_Eng.rpt", 1)
rep.RecordSelectionFormula = "{Pro8.VillageNo} = " & cmbVillage.ItemData(cmbVillage.ListIndex)
rep.ExportOptions.DiskFileName = App.Path & "\Reports\pdf_report.pdf"
rep.ExportOptions.DestinationType = crEDTDiskFile
rep.ExportOptions.FormatType = crEFTPortableDocFormat
rep.Export False
The only thing is that I am using RecordSelectionFormula.
If I try to run the above code without RecordSelectionFormula then it work fine...
Any suggestion...
Regards.