How to Export to a PDF file in Crystal Report?

后端 未结 4 1106
清歌不尽
清歌不尽 2021-01-03 09:04

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. Cho

相关标签:
4条回答
  • 2021-01-03 09:25

    In my case, on Windows 8.1 x64, the solution was to:

    1. locate, on the dev machine, the folder %programfiles%\Seagate Software\Shared
    2. copy crtslv.dll and ExportModeller.dll from the dev machine to the C:\windows\SysWOW64\ folder

    3. open a command prompt with administrator's privileges

    4. register both crtslv.dll and ExportModeller.dll with regsrv32
    5. Retry the pdf export...

    That's all.

    0 讨论(0)
  • 2021-01-03 09:31

    1) Setup crystal report.. 2) Copy crxf_pdf.dll copy from c:\windows\crystal to c:\windows\system32 folder inside… 3) Then problem solved..

    0 讨论(0)
  • 2021-01-03 09:52

    Try,

    Private 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 
    
    0 讨论(0)
  • 2021-01-03 09:52

    It sounds like a deployment problem with the Crystal files. Check the user has a file called u2ddisk.dll on their machine - this file is required for Crystal 8.5 to give the option to export to file. Otherwise it'll select the Export to Application option instead. The availability of items in the Export Format and Export Destination dropdowns is dependend on the dlls present, and it sounds like you're missing Export To Disk from the Destination dropdown.

    0 讨论(0)
提交回复
热议问题