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!

How do I create a MultiField Parameter from a stored procedure?

Status
Not open for further replies.

msflinx

Programmer
Mar 11, 2003
16
US
I know this is 101 stuff, but I'll be danged if I can figure it out.

I have a stored procedure that returns OrgID, OrgName. I want to show
OrgName, for the client to choose from, and assign OrgID to the parameter, to
pass to the report stored procedure.

Help, please....

msflinx
 
So you have created a datasource and set its command type to StoredProcedure, then specified the stored procedure in the Query String box?? Just making sure we are on the same page to start with.

Now, click the Layout tab at the top of the designer window, right-click in an open space outside of the report canvas, select "Report Parameters", and then select your parameter from the Parameters list. On the right side of this screen find the "Available Values:" area, select the option labeled "From query", in the Dataset dropdown, select the dataset you created for this parameter, in the "Value field:" select OrgId, and in the "Label field:" select OrgName.

I'm assuming then that you have a second datasource defined for the report body that takes this OrgId value and uses it in a WHERE clause
Code:
WHERE OrgId = @OrgId
I hope this helps you out more than it confuses you. Let me know how it works.
 
Thank you. That was exactly what I was looking for.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top