Reporting services 在SSRS 2008 R2中选择参数中的一个或所有值
我在SSRS从事一个报告项目。我有一个名为“customer”的参数。此参数的值现在由sql查询填充。我想限制此参数,以便用户能够选择一个客户或所有客户。不能选择2个或3个客户。在参数列表中有一个名为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>
所有客户的选项,该选项已排序,因此位于参数列表的顶部
如果手动添加参数选项,则此排序很容易。如果是数据驱动的,则可以在参数值数据集中执行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