Here's an odd one.
Environment:
VB.NET Winform
Visual Studio 2008
.NET framework 2.0
Crystal Reports 2008
ODBC connection
I have three reports, living in the same directory. They are essentially identical, except for the grouping. All three run successfully within Crystal reports.
From a report viewer Winform in VS, two of the three run. As I am dealing with a small data set, the reports render quickly. On the third report, There is a long pause when the report viewer form opens, then I finally get an error:
"Failed to open the connection. Details: [Database Vendor Code: 17] Failed to open the connection. CallReportByExtension 58F5C135-7BA3-4215-898A-DADA6C7DAD9C.rpt Details:[Database Vendor Code: 17]
I was initially getting similar errors on all three reports, before changing the datasource location to my ODBC connection. I have double-checked the location, verified the database, etc.
What am I doing wrong? I can provide the VB code if requested, but since the other two reports work properly, I doubt it's code. I do know that I am passing the report name and path correctly to the report viewer form.
As I am about to kick my monitor through the window and become a street denizen, I would greatly appreciate any help that would be offered.
Thanks,
Mike Beckner
Request clarification before answering.
My turn,
Error code 17 indicates the report is trying to connect to a data source that no longer exists. Which is why it also takes a minute for the ODBC or OLE DB connection to time out. Somewhere in the old report there is a reference to the old connection info.
As you have discovered the only way to clean this up is to re-build the report. At some point a step was missed when setting location to ODBC and left some old DB connection info behind in the report.
Unforetunately there is no way to view the connection info in the RPT file after version 8.5. In 8.5 using notepad and opening the RPT file you can see the connection info. Likely when this report was upgraded to the current version some reference was left behind. Possibly manually modified the SQL statement when it was allowed. To confirm if you select Show SQL Query, if a RESET button is in the window then it indicates at some time you had manually modified the SQL and this may be causing it to try to to connect to the old source.
I any event we'll consider this thread complete and closed.
Final work around: Rebuild the report.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.