Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CRAXDDRT.Application.OpenReport causing system error from VB

Status
Not open for further replies.

petherin

Programmer
Dec 3, 2002
13
0
0
GB
I have a VB program which uses Crystal Reports 8.5 ActiveX Designer Design and Runtime Library (craxddrt.dll). I want to open a report using the CRAXDDRT.Application object, but a Windows system error is occurring when the OpenReport method of the CRAXDDRT.Application object is used.

First, a CRAXDDRT.Report object is created. Then a CRAXDDRT.Application is created, and its OpenReport method is used to open a report which resides on the local hard drive. The path to the report has been verified as correct, but a Windows system error is still created. The error says 'The program has encountered a problem and needs to close.'

Code summary:
Code:
Dim objCrystalReport As New CRAXDDRT.Report

Then the following function is called:

Code:
Private Function SetupParameters(objCrystalReport As CRAXDDRT.Report) As Boolean

   Dim objCrystalApp As CRAXDDRT.Application   

   Set objCrystalApp = New CRAXDDRT.Application
   Set objCrystalReport = objCrystalApp.OpenReport(sReportPath & sReportName) 'The error occurs when this line is executed

System: Windows XP SP 1
Crystal Reports 8.5.3.975 (SP3 has been applied)
VB6 SP5

Strangely, other reports are opened fine, but others aren't, and there's no discernible difference between them. Can someone tell me what's going on?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top