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.Destin ationType = crEDTDiskFile
'Export to PDF
crRep.ExportOptions.Format Type = crEFTPortableDocFormat
'Export path and file name
crRep.ExportOptions.DiskFi leName = "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.
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.Destin
'Export to PDF
crRep.ExportOptions.Format
'Export path and file name
crRep.ExportOptions.DiskFi
'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.
Submit a request in the Community Support forum to delete this question
mlmcc
mlmcc
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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!
ASKER
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.