Using dropdown parameters in SSRS report

北战南征 提交于 2020-01-21 06:27:06

问题


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

  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




回答2:


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




回答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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!