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!

How to Pass a parameter to a Stored Procedure

Status
Not open for further replies.

bigfoot

Programmer
May 4, 1999
1,779
US
I've been all over the net on this one.

I'm using Crystal Reports XI. Not VB, not C#, just the Report Creator.

I will be calling this from another source.


I have a test stored procedure that takes 1 parameter. If I use the report expert, and choose the stored procedure, it prompts me in the beginning for the parameter to send to the report and sets it all up for me. Great!

I added another parameter. Now the report doesn't work when run from the designer because the stored procedure NOW expects 2 parameters. It's all good.

But I can't edit the SQL Query, so how do I add in another parameter and wire it to the stored procedure.
I added it as a parameter but the stored procedure doesn't see it.


I haven't found a website that will help, nor is there any help in the help file on this.

Thanks ahead of time for any and all help.

 
In Crystal 10, if you select Database and then Datebase Expert, you should see the stored procedure as 'Command', or some other name if you renamed it. Right-click on that and you can edit the command. This includes adding a new parameter.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Madawc, when I add in a new parameter, and then save, then edit again, it's not there.

it seems to vanish.
 
That baffles me. Can anyone else help?

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Got it working. I needed some help from another site.
No help from Crystal help it seems.
 
What I did not do was actually USE the parameter that I created. Stupid me forgot to set it up, meaning dbl-click on it and use it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top