如何以特定方式在SSRS报表上显示多值参数,以范围和/或逗号分隔

时间:2018-10-30 18:07:14

标签: sql-server reporting-services

在SSRS中,我需要以一种方式在报表上显示多值参数,如果按顺序选择值,它们将显示为:1-5、7、9-10、15,依此类推。在值的下拉列表中有以下值:从'0'到'200'。

预先感谢您的帮助。

到目前为止,这是我在SQL中所做的事情,因此我正在考虑更新'String_To_Use'列,使其显示:0000-1020、1199-1210、1260、1299。然后使用此字符串显示到SSRS上报告。这些是在SSRS中从下拉框中选择的值。我还不知道如何将这些值传递给SQL代码。请同时为这部分提供帮助。

This is the #tempTable1...column 'DPRTMNT' has the values chosen ...Checking_Dept has the value-2 when values in ranges

This is the #tempTable2..I need to update 'String_To_Use' column so it would contain: 0000-1020, 1199-1210, 1260, 1299. #tempTable1 can help to build the logic

1 个答案:

答案 0 :(得分:0)

将dsBranchPlant替换为用于提供数据参数的数据集名称。 “全部”条件是选择所有参数而不是显示每个参数。以此表达自己,看看自己的立场。

iif(Parameters!BranchPlant.Count = CountRows("dsBranchPlant"),"ALL",Join(Parameters!BranchPlant.Label,","))