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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying Crystal report on ASP.NET page 1

Status
Not open for further replies.

mtessier

Programmer
Jun 25, 2008
37
US
Hello All,

I’m having trouble getting a Crystal 9 report that pulls data from Oracle native connection to run in the CrystalReportViewer control on my ASP.NET 2.0 web page. The report does have 2 subreports, and one of them uses a stored procedure returning a ref cursor. The rest of the report just reports against tables directly. I have Crystal designer 9 installed on my desktop and the report runs fine there. It is working for me when I run it on my local ASP.NET file system web server, but it is not working when I copy the web pages and report file to the development web server. Here’s what we’ve done to the web server so far:
- I have run CRRedist2005_x86.msi on the web server
- The web files reside in the D: drive, so I copied the CrystalReportWebFormViewer3 folder to the appropriate location on the D drive
- I copied the crdb_oracle.dll in the C:\Program Files\Common Files\Business Objects\2.7\Bin
- Our web user account has Read & Execute, List Contents, and Read permissions to the C:\Windows\Temp folder
I have attached a copy of the screenshot of the error and a copy of the code I’m using to load the report into the CrystalReportViewer control (with confidential info removed, of course). The connection info I’m passing is the same connection info that our web apps use to connect to Oracle. I’ve googled my error and seen some forum posts with the same error, but nobody seems to have found a clear-cut solution. Can someone please help me with this?

Thanks in advance,

Mike
 
After some trial and error, I was able to narrow the problem down to a stored procedure call in one of the subreports. The stored procedure returns a ref cursor. Excluding this subreport causes the report to run fine. Removing the stored procedure call is not an option as performance is already an issue with this report.

So, now the question is what needs to be installed/configured on the web server so that CR.NET will run the report with the stored procedure?

Thanks,

Mike
 
crystal works fine with stored procs. it's probally the returning cursor that's the problem. can you refactor the proc to not use a cursor?

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Hi Jason,

Thanks for your reply. I just spoke to the developer who wrote the Crystal report and the stored procedure and she says that the only way that Crystal reads data from an Oracle stored procedure is through a ref cursor. I found some documentation from Business Objects about working with Oracle stored procedures and all of the examples return a ref cursor, so her claim appears to be correct.

Thanks,

Mike
 
Hello All,

This issue has been resolved, so I thought I would share the solution that worked for us and hopefully save others some pain. There seem to be a lot of threads on the web about this issue, but no clear-cut resolutions.

There is no Oracle driver that comes with the Crystal classes for VS2005, hence the reason I tried to use crdb_oracle.dll from CR9. I got some support from SAP and they suggested upgrading my runtime to use CR2008, since it has an Oracle driver. As per SAP support's instructions, I got the CR2008 designer installed on my desktop, opened my .NET project, and VS2005 was smart enough to notice that I have CR2008 runtimes and upgraded my references to use the CR2008 runtimes. This worked well on my desktop, but it was working before so this was no surprise. I then got an install package from SAP to install CR2008 runtimes on the web server. I ran the install, uninstalled the Crystal runtimes for VS2005 (CRRedist2005_x86.msi), and lo and behold the report fired up just fine from the web! We did have one more issue to resolve regarding the web user's Oracle permissions, and also the report designer had to do a Set Location in the report itself so that the report was pointing to the right server name (I don't know the full details behind the Set Location, I'm just going on what she told me). This is now working flawlessly in all 3 web environments!

Therefore, I believe the moral of the story is to avoid the 2005 Crystal classes when you need to work with Crystal in .NET 2.0.

Thanks,

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top