Using VB 6 and Crystal Report 8.5 In client system while generating the report, I clicked export to PDF button in the report; it displayed Export, Export Option. Choose Export file is not displaying in the client system. But in my system, it was displayed it displayed Export, Export Option. Choose Export file. But in client system is not showing the choose export file screen. I cannot able to save a report file in pdf. Because it was not asking a file name to save. Can any one help to solve this problem?
asked Aug 31, 2009 at 9:13 11.9k 52 52 gold badges 157 157 silver badges 230 230 bronze badgesPrivate Sub ExportReportToPDF(ReportObject As CRAXDRT.Report, Byval FileName As String, Byval ReportTitle As String) Dim objExportOptions As CRAXDRT.ExportOptions ReportObject.ReportTitle = ReportTitle With ReportObject .EnableParameterPrompting = False .MorePrintEngineErrorMessages = True End With Set objExportOptions = ReportObject.ExportOptions With objExportOptions .DestinationType = crEDTDiskFile .DiskFileName = FileName .FormatType = crEFTPortableDocFormat .PDFExportAllPages = True End With ReportObject.Export False End Sub Private Sub Command1_Click() Dim objCrystal As CRAXDRT.Application Dim objReport As CRAXDRT.Report Set objCrystal = New CRAXDRT.Application Set objReport = objCrystal.OpenReport(ReportFileName, 1) ExportReportToPDF objReport, "c:\foo\foo.pdf", "foo" End Sub
answered Aug 31, 2009 at 9:20
KV Prajapati KV Prajapati
94.4k 20 20 gold badges 150 150 silver badges 188 188 bronze badges
In my system, Is asking a file name to save, But in Client system is not asking a file name to save?
Commented Aug 31, 2009 at 9:22
@adatapost - Export PDF is already built in function in Crystal Report 8.5, Why should i Have to write a code for Export to PDF. In my System is aksing a file name to save. But in Client system export PDF screen is displaying, but it is not asking a file name to save.
Commented Aug 31, 2009 at 9:49@Gopal - We export to PDF on a client system every day. We prompt our users for the file name and set the filename in the export options as above. It should just work.