问题
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?
回答1:
In short
Right click the parameter
Select "Available Values" section
Click the "Get values from a query" option
Select the appropriate dataset and fields
回答2:
My solution:
Right click the parameter under the "Report Data" and select "Parameter Properties"
Select "Available Values" section
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
回答3:
This following articles cover exactly what you need to know about setting report parameters in SSRS:
- MSDN: Adding Parameters to Create a List of Available Values (SSRS)
- Building Reports in SQL Server
回答4:
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.
回答5:
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.
来源:https://stackoverflow.com/questions/4851800/using-dropdown-parameters-in-ssrs-report