cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

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

0 Likes
View Entire Topic
former_member203619
Contributor
0 Likes

It's possible that you have a partially corrupt report.

The standard troubleshooting routine that I do in a situation like this is as follows:

1. Make a backup

2. Remove everything from the report so that all there is is a completely blank report - test it - if it works, then it was something on the report. If not, then it's either in a group (If any are left), or in the command itself

3. If it works, then restore from backup, and this time only remove half of the report - test it - if it fails, then remove even more and test again.

4. Basically, keep removing objects from the report until it works - then I would know that the last object removed was the problem.

5. If it fails until I remove the last database object from the report - then I know that it is something to do with the database connection itself.

It's a bit tedious - but it usually works to narrow down the exact problem.

Shawn