如何在不检查 "allow multiple values?" 的情况下在 SQL Server Report Builder 中添加 "Select All" 选项

How do I add a "Select All" option in SQL Server Report Builder without checking "allow multiple values?"

我有一份带有状态参数(整数)的报告。该报告根据select编辑的状态显示不同的数据。我想添加一个 "Nationwide" 选项,但我不想检查 "allow multiple values" 因为不需要 select 此报告的多个状态。

只需向您的参数查询或新项目添加一个新值,标签 "Nation Wide" 和值 -1,然后在您的查询中如果参数等于 -1 则不要使用 where 子句

if @parameter = -1
 begin
   select *
   from table
 end 
else 
 begin
   select *
   from table where
   status = @parameter
 end