I have an old VB6 app that I have been supporting for many years. The app has a form with a Crystal Viewer. My OS is Windows XP SP3, and I am using Crystal Reports 2008. The references in the app are for Crystal Report Controol 9; Crystal ActiveX Report Viewer Library 10.0; and Crystal Reports 9 ActiveX Designer Run Time Library. I have not made any changes to the viewer control, the references, or the version of Crystal Reports since 2008.
Last week I added a report built with Crystal Reports 2008. The report fails with the following error:
Run-time error '-2147417848 (80010108)':
Method 'Value' of object 'IConnectionProperty' failed
I have been able to trace it down to the following call:
crxReport.Database.Tables(1).ConnectionProperties("User ID") = <my user id>
crxReport is dimmed as CRAXDRT.Report
The code to open the report executes just fine:
Dim crxApplication As CRAXDRT.Application
Dim crxReport As CRAXDRT.Report
Set crxApplication = New CRAXDRT.Application
Set crxReport = crxApplication.OpenReport(<ReportName>)
When I put a breakpoint on the line of code that fails, I can retrieve the data from the object, and it is all correct (Field Names, Table Names, Connection String, etc.).
The code supports numerous other reports developed with Crystal Reports X, XI, and 2008 and has never failed since it was written over 6 years ago. Can someone give me a clue as to what the significance of this error is and how I might be able to correct it.
Thank you,
Jack