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

Procedure Expect Parameter which was not supplied

Status
Not open for further replies.

robertfah

Programmer
Mar 20, 2006
380
US
I'm using Crystal Reports 10 and have created a simple report that uses a Stored Procedure which expects a parameter. I design it and run it inside CR and it prompts for a parameter and works fine when one is entered. When I place this report in a program that basically selects reports from a directory and runs the report in the CR Viewer, I get the following error:

Code:
Failed to open a rowset.
Details: ADO Error Code 0x
Source: Microsoft OLE DB Provider for SQL Server
Description: Procedure 'TestProc' expects parameter '@ParamID', which was not supplied.
SQL State: 42000
Native Error:
Failed to open a rowset

Weird part is if I remove the parameter and just do a select * in the SP, the program will open the report just fine, so it seems to have something to do with the parameter.

I made sure I clicked Verify Database and that the Save Data with Report is unchecked.

Any ideas?
 
Hi,
If your program fails to supply a parameter value to the proc that expects one,thats the error you should get. ( the CR Viewer is not the same as CR and I do not believe it will prompt, it just displays what is returned from the Proc) Your program needs to pass a value somehow when it calls the report ..




[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Interesting....we created another program a while back in C# and it called a CR that needed parameters and when it opened it, it would prompt for a parameter, which is what I was hoping this program would do.....
 
Hi,
Did it call the CR Report itself or the CRViewer ( both are possible from C# or VB)..



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
In the program where the report (with params) works, we call the CR Viewer....the other program is a 3rd party program which loads any CR that the user creates.....We've spoken with them and they said there should be no problems trying to do what we are doing.

Here's the strange part.....we took the production DB that we're pulling data from for the report, moved it to our Staging evironment and it works.....but it only works for the person who developed the report....so I'm thinking it has something to do with permissions within CR.....but we can't figure it out....we've looked at the DB user login information on both servers and they are identical.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top