Thursday, March 22, 2012

Crystal Reports for VS 2005 - Passing SQL Stored Procedure Parameters

I have a report which uses a stored procedure with several parameters which gets loaded into the Report Viewer control. When I run this report on the development machine everything works correctly, but after I publish it to another machine (or even another website on the development machine), I get the message:

Failed to open a rowset. Details: ADO Error Code: 0x Source: Microsoft OLE DB Provider for SQL Server Description: Procedure or Function 'uspReport_IncidentBrowse' expects parameter '@.departmentid', which was not supplied. SQL State: 42000 Native Error: Failed to open a rowset. Error in File C:\WINDOWS\TEMP\rptincidentbrowse {5F03A03D-6BF9-4121-B68C-06D9C89283A1}.rpt: Failed to open a rowset.

I have other reports which do not have SQL parameters which run fine. All the reports have a parameter for the title line of the report and this is getting set correctly.

I have searched and found numerous examples of how to programatically set parameters... all of which work fine on the development machine, but all produce the result above once the website is published ANYWHERE.

Is this a limitation of Crystal Reports for Visual Studio 2005?IIRC, the license for Crystal Reports included with Visual Studio is for no-production use ONLY. (It's been a while since I have used Crstal, much preferring SQLServer Reporting Services.....)|||According to their license agreement you are allowed to deploy to a production server.

In addition, regardless of licensing issues, I would not be willing to purchase an enterprise (or any other) CR license unless we are able to solve this problem in a proof of concept deployment.

Does anyone have an authoritative answer?

No comments:

Post a Comment