Search code examples
sqlreporting-servicesssrs-tablixreportingservices-2005

How to pass a Id parameter to stored procedure using a name column in SSRS


I need to pass an integer to a stored procedure but in SSRS report I want to select a name instead of the integer. Can anyone help with this?

1. Apple
2. Ball
3. Car

For example from the above table, I want the user to select the apple or ball or car from the parameter dropdown but the procedure should get 1 or 2 or 3 as input parameter.


Solution

  • Report parameters have a Value field & a Label field. In your case, the Label is what appears in the drop-down (Apple, Ball & Car) & the Value is what you pass as the parameter to the stored procedure (1, 2, 3).

    SQL Server Central have a tutorial on how to set up a report using parameter Values & Labels with a stored procedure here.