Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/reporting-services/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reporting services 在SSRS 2008 R2中选择参数中的一个或所有值_Reporting Services_Ssrs 2008 R2 - Fatal编程技术网

Reporting services 在SSRS 2008 R2中选择参数中的一个或所有值

Reporting services 在SSRS 2008 R2中选择参数中的一个或所有值,reporting-services,ssrs-2008-r2,Reporting Services,Ssrs 2008 R2,我在SSRS从事一个报告项目。我有一个名为“customer”的参数。此参数的值现在由sql查询填充。我想限制此参数,以便用户能够选择一个客户或所有客户。不能选择2个或3个客户。在参数列表中有一个名为所有客户的选项,该选项已排序,因此位于参数列表的顶部 如果手动添加参数选项,则此排序很容易。如果是数据驱动的,则可以在参数值数据集中执行union all,以获得正确的顺序: select <Unique value that matches your customer ID type>

我在SSRS从事一个报告项目。我有一个名为“customer”的参数。此参数的值现在由sql查询填充。我想限制此参数,以便用户能够选择一个客户所有客户。不能选择2个或3个客户。

在参数列表中有一个名为
所有客户的选项,该选项已排序,因此位于参数列表的顶部

如果手动添加参数选项,则此排序很容易。如果是数据驱动的,则可以在参数值数据集中执行
union all
,以获得正确的顺序:

select <Unique value that matches your customer ID type> as Value
      ,'All Customers' as Label
      ,1 as SortOrder

union all

select CustomerID as Value
      ,CustomerName as Label
      ,2 as SortOrder
from CustomerTable
order by SortOrder
        ,Label

在参数列表中有一个名为
All Customers
的选项,该选项已排序,因此它位于参数列表的顶部

如果手动添加参数选项,则此排序很容易。如果是数据驱动的,则可以在参数值数据集中执行
union all
,以获得正确的顺序:

select <Unique value that matches your customer ID type> as Value
      ,'All Customers' as Label
      ,1 as SortOrder

union all

select CustomerID as Value
      ,CustomerName as Label
      ,2 as SortOrder
from CustomerTable
order by SortOrder
        ,Label