14

I can see the text box for my data set that having the

"select col1 from table name " as query. I want to populate dropdown instead of text box. I have created the parameter for it . what to do?

NakedBrunch
  • 48,713
  • 13
  • 73
  • 98
Red Swan
  • 15,157
  • 43
  • 156
  • 238

5 Answers5

25

In short

  1. Right click the parameter

  2. Select "Available Values" section

  3. Click the "Get values from a query" option

  4. Select the appropriate dataset and fields

Nat
  • 14,175
  • 5
  • 41
  • 64
  • Do you happen to know how I display the text instead of the value from the dropdown on the report? I have guid and Description but if I add the parameter I get the guid on the report. Clearly I want to show the Description of the selected item but can't work out how. – Norbert Norbertson Sep 29 '20 at 10:36
  • Never mind. I got there. Added a text box with this expression: =First(Fields!Text.Value, "DateDropDown") – Norbert Norbertson Sep 29 '20 at 11:00
7

My solution:

  1. Right click the parameter under the "Report Data" and select "Parameter Properties"

  2. Select "Available Values" section

  3. Click the "Get values from a query" option

4a. Select the appropriate query to use

4b. Select the Value that you want the main query to use to generate the data

4c. Select the Label that will show in the drop down box that the User sees and selects a option from

Aaron Lelevier
  • 19,850
  • 11
  • 76
  • 111
  • 1
    This answered was perfect, I could not figure out how to find the "Parameter Properties" and this gave exact directions. – Tony Jun 29 '15 at 15:49
5

This following articles cover exactly what you need to know about setting report parameters in SSRS:

NakedBrunch
  • 48,713
  • 13
  • 73
  • 98
  • 1
    This is not working for me, intention is this , is any setting to view the dropdown instead of text box? I have VS 2008, sql server 2008 R2 – Red Swan Jan 31 '11 at 14:39
  • 1
    Did you follow the steps in the MSDN article? In particular, go to the section titled "To populate the report parameter with a list of available values". Read that section. It has step by step instructions that will result in a dropdown instead of a textbox. – NakedBrunch Jan 31 '11 at 15:08
2

If you already deployed a previous version of your report, for some reason this kind of parameter change doesn't get picked up when you redeploy. Try deleting the report using Report Manager, then redeploy.

pollifax
  • 51
  • 3
2

follow these steps 1.In the Report Data pane, expand the Parameters node and right-click on the parameter, then click Parameter Properties.

2.In Prompt, type Select :.

3.In Data type, select datatype.

4.Click Available Values.

5.Select the Get values from a query option.

6.select value field and Label field

7.In default values select Get values from a query option. 8.From the Dataset drop-down list, select BusinessPersons.

9.From the Value field drop-down list, select BusinessEntityID.

10.Click OK.

shruti
  • 21
  • 1