Link to home
Start Free TrialLog in
Avatar of sjam1979
sjam1979

asked on

Failed to export the report

Hi Experts,
Development machine runs on Win2000(sp3) and am working with VB 6.0 and Crystal Report 8.5 (sp2). I have used Crystal Report Viewer control in my form. I was trying to export the report without asking from the user the format and path; but failed cause of this Run Time error.

   '*** Code starts from here ***
   Dim crApp As New CRAXDDRT.Application
    Dim crRep As CRAXDDRT.Report
       
    'Export to disk
    ' Location of the report
    'Set crRep = crApp.OpenReport(App.Path & "\DAILY REPORT.RPT")
    Set crRep = CRViewer.ReportSource
    crRep.ExportOptions.DestinationType = crEDTDiskFile
    'Export to PDF
    crRep.ExportOptions.FormatType = crEFTPortableDocFormat
    'Export path and file name
    crRep.ExportOptions.DiskFileName = "c:\MyReport.pdf"
    'Export without displaying the 'Export' dialog box
     crRep.Export False  '*? This line is generating Run Time Error '-2147190908'

I would really appreciate if someone helps me out.
Thanking You.
Avatar of sjam1979
sjam1979

ASKER

Well,
I got the solution to the problem myself. It was version conflict with the Dll's which were updated during the installation of Service Pack 2 of CR.
Here's what I had done - Uninstall the Crystal Report and tried installing it again, that would bring the files with their original version.
Avatar of Mike McCracken
Submit a request in the Community Support forum to delete this question

mlmcc
ASKER CERTIFIED SOLUTION
Avatar of modulo
modulo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This seems to be a registry problem. Pls make sure you the correct version of exportmodeller.dll and crtslv.dll on your machine in the right folders. Pls register them and give it a try!