cancel
Showing results for 
Search instead for 
Did you mean: 

CR 2008 .NET Viewer App Failing on 2nd Data Retrieval from Oracle

ido_millet
Active Contributor
0 Kudos

The Viewer application is a .NET VS2008 CR2008 SP3 viewer application.

Data source: Oracle via ODBC (same problem with both 'Oracle in OracleClient10203' as well as 'CR Oracle ODBC Driver 5.3).

The problem occurs only upon refresh. In other words, only after data retrieval has been done once.

By using ODBC tracing, we found that on the first data retrieval the View used by the report was qualified (in the SELECT FROM... statement) and the report ran fine. However, on the second call the qualifier was stripped causing a failure to locate the Oracle View.

Same report using Crystal XI R2 RDC Viewer runs and refreshes fine, so I suspect the problem is in the Crystal 2008 runtime components.

Is this a known issue?

- Ido

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Ido,

Moved to the .NET SDK forum. I assume this all works in CR Designer?

Not that I've seen. What does your logon code look like? Any subreports and are you looping through and logging them on also?

When you say second call are you using the Viewers refresh button or your own?

Thanks

Don

ido_millet
Active Contributor
0 Kudos

Thanks! It's good to have a confirmation you are not aware of such an issue.

There are no subreports in this scenario and it's my code that handles the refresh. However, I'm not doing anything in the refresh that is different from the initial connect (except that the connection is already established so there is no need for logon processing).

I'll try to isolate the issue further and report back if I have any news.

0 Kudos

Hi Ido,

Watch out for the Refresh and Verify API's, sometimes what they do is discard your changes to the logon info and use what is saved in the RPT file which of course typically fails because no password is set.

If you look at trace logs you'll also notice that CR does disconnect from the server after the report is run. We do this to free up a connection to the Server, most servers anyways, because some do have limits as to how many open connects can exist at one time. CR keeps the logon info internal so when the refresh is made we pass the connection info again.

Thanks again

Don

ido_millet
Active Contributor
0 Kudos

Thanks, Don.

The connection upon Refresh doesn't fail. What causes the failure is the attempt to SELECT from a View name that is no longer qualified. On first connect, the SQL statement passed to the server contains a ... FROM "Qualifier.View_Name".

On refresh, the SQL statement passed to the server contains only ... FROM "View_Name". Note how the Qualifier disappears.

I still think this is a problem in the runtime components and not in my code but if that is true, sooner or later someone will report the same problem...

Answers (0)