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

Passing Parameters to a Stored Procedure

Status
Not open for further replies.

mdtimo

Programmer
Oct 18, 2001
38
US
I have created a stored procedure on an Informix Database and want to be able to pass a parameter from a crystal report to the stored procedures parameter. I can set the parameter on the stored procedure when adding the stored procedure but then can't see how to have the stored procedures parameter determined by the Crystal Parameter. How do I set it up so the parameter from Crystal is linked to the parameter in the stored procedure?

The Informix stored procedure iniitally had no fields it was returning either, although I set it to return a field justt so it would show on the report.

The stored procedure is being used to update a table that this report will use to run against.
 
Uncertain about Informix, this applies to SQL Server and Oracle,it's probably the same.

Crystal should show the parameter in the report when you connect to the SP.

You may be required to use the CR Informix driver, which is the case with Oracle (though I have gotten others to work).

And you don't connect a CR parameter to a parameter from a SP, the parrameter will be automatically created in the report if CR recognizes that the SP has a parameter.

-k kai@informeddatadecisions.com
 
You are saying they would have to enter the parameters twice if both the Crystal report and the stored procedure are using them. Is that correct? That would be rather annoying.
 
No.

What I'm saying is that the parameter is set up by the SP, you don't have anything to create other than the SP with the parameter in it.

You do NOT connect a CR parameter to your SP parameter, the user will only be prompted for the parameter once.

-k

kai@informeddatadecisions.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top