简体   繁体   English

如何从 SSRS 报告参数的下拉列表中删除 select 值?

[英]how to remove select a value from drop down in SSRS report parameter?

how to remove from drop down in SSRS report parameter?如何从 SSRS 报告参数的下拉列表中删除? if i set default value to report parameters, gets disappear in preview but it will appears after deploy the reposts如果我将默认值设置为报告参数,则会在预览中消失,但它会在部署转发后出现

Using a default value will remove the 'select a value' option from the list.使用默认值将从列表中删除“选择值”选项。 This default can be different from values in the list and is set from the bottom section of the parameters menu.此默认值可以与列表中的值不同,并在参数菜单的底部进行设置。

In the Report Manager click by the side of the report to bring on the other options.在报告管理器中,单击报告旁边的以显示其他选项。 Click on Manage.点击管理。 In the report properties, click on Parameters.在报告属性中,单击参数。 Set the default value for what ever parameter you were doing in the BIDS.为您在 BIDS 中所做的任何参数设置默认值。 VOILA...瞧……

I faced the same issue.我遇到了同样的问题。 Tried this method and got it.尝试了这个方法并得到了它。

Cheers!!!干杯!!!

Vihar维哈尔

I had the same problem.我有同样的问题。 The only thing that helped me was in parameter properties in default value to input the value like expression ( don't just enter value in textbox )唯一对我有帮助的是在默认值的参数属性中输入表达式之类的值(不要只在文本框中输入值

Try to build expression: =your_value尝试构建表达式:=your_value

example: =1示例:=1

To remove the default values for a report parameter删除报告参数的默认值

In the Report Data pane, expand the **Parameters** node. Right-click the parameter and click **Edit**. The **Report Parameter Properties** dialog box opens.

Click **Default Values**.

**In Select from one of the following options**, click **No default value.**

Click OK.

If I'm understanding the question correctly: just create a separate data set and use the result set as the available values for your parameter.如果我正确理解了这个问题:只需创建一个单独的数据集并将结果集用作参数的可用值。 Discriminate in your where clause.在你的 where 子句中区分。

-- (example) Query used in the CarMakes dataset
SELECT DISTINCT make
FROM    tbl_Cars
where  make not like 'Toyota',
        and make not like 'Ford'
        and make not like 'Kia'
union select '- Select Make -';  -- used as first value in drop down 

Then set the data set you create as the available values for your parameter.然后将您创建的数据集设置为参数的可用值。

If your drop-down result set has values like the below:如果您的下拉结果集具有如下值:

id-value身份价值

  • 1--ABC 1--ABC
  • 2--XYZ 2--XYZ
  • 3--SWS 3--SWS

Just add the null,'-Select-' value to the top of the result set:只需将 null,'-Select-' 值添加到结果集的顶部:

id-value身份价值

  • null-- -Select-空--选择-
  • 1--ABC 1--ABC
  • 2--XYZ 2--XYZ
  • 3--SWS 3--SWS

Now go to your report's parameter properties and set a default value (null).现在将 go 设置为报表的参数属性并设置默认值(null)。 Note: Default value should be in brackets:(null)注意:默认值应在括号中:(空)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM