Here is an example of what my tablix/matrix looks like and some examples of what should happen. I have the parameters in the second report setup to accept values and in the main report I have just selected the field it should pass. Since it’s a matrix and grouped, I would think if you clicked a sub total row it would know what values relate to that row.
下面是我的Tablix /矩阵的示例以及应该发生的一些示例。我在第二个报表设置中有参数接受值,在主报表中我刚刚选择了它应该传递的字段。由于它是一个矩阵并被分组,我认为如果你点击一个子总行,它会知道哪个值与该行有关。
Following examples,which define what should happen:
以下示例定义了应该发生的事情:
1.When i click on cell B3(USA) it will pass Locations name i.e USA and Customer name i.e ABC as a parameter to sub report.
1.当我点击单元格B3(美国)时,它将传递位置名称,即美国和客户名称,即ABC作为子报告的参数。
2).When i click on cell B5 i.e Sub total, it will send both locations i.e. USA,Dubai and customer name i.e.abc as a parameter to Sub Report.
2)。当我点击B5单元格即Sub sub时,它会将两个位置,即USA,Dubai和客户名称ieabc作为参数发送到Sub Report。
3).When i click on cell B10 i.e Grand Total, it will send all Customer names with there respective locations as a parameters to the sub report.
3)。当我点击B10单元格即Grand Total时,它会将所有客户名称作为参数发送到子报告中。
Thank You
谢谢
2 个解决方案
#1
4
This is how I would do it. For the Subtotal link, pass "ALL" for the Location Parameter and =Fields!.Customer.Value
for the Customer Parameter. For the Grand Total link, pass "ALL" for both Parameters. Then update your Sub-Report Query Where
clause:
我就是这样做的。对于小计链接,为位置参数传递“ALL”,为客户参数传递= Fields!.Customer.Value。对于Grand Total链接,为两个参数传递“ALL”。然后更新您的Sub-Report Query Where子句:
Where
(Customer = @Customer or @Customer = 'ALL')
and (Location = @Location or @Location = 'ALL')
This will return all Customer/Location records when the respective Parameters are set to 'ALL'.
当相应的参数设置为“ALL”时,这将返回所有客户/位置记录。
Let me know if you need any more detail.
如果您需要更多细节,请与我们联系。
#2
2
I don't think you can achieve exactly what you want for your examples 2 and 3 using SSRS alone.
我不认为你可以单独使用SSRS来实现你想要的实例2和3。
I would derive new columns in the Dataset to hold the concatenated parameter strings you want to pass. For your example 2, this column might be called Customer_Locations and hold a value of "USA|Dubai". I would pass that value to a multi-valued parameter in the sub report, using the SSRS Split function in the Subreport Parameter definition. Its important that the chosen delimiter doesn't appear in the possible Location values.
我会在数据集中派生新列来保存您想要传递的连接参数字符串。对于您的示例2,此列可能称为Customer_Locations,其值为“USA | Dubai”。我将使用子报表参数定义中的SSRS拆分功能将该值传递给子报表中的多值参数。重要的是所选分隔符不会出现在可能的位置值中。
The same value would repeat in each row of the Dataset, for all the rows for that Customer.
对于该Customer的所有行,数据集的每一行都会重复相同的值。
For example 3, I would add 2 further columns e.g. Customer_Locations_Grand_Total = "USA|Dubai" and Customers_Grand_Total = "ABC|CDE". These same values would repeat for all rows.
例如3,我会再添加2个列,例如Customer_Locations_Grand_Total =“USA | Dubai”和Customers_Grand_Total =“ABC | CDE”。对于所有行,将重复这些相同的值。
#1
4
This is how I would do it. For the Subtotal link, pass "ALL" for the Location Parameter and =Fields!.Customer.Value
for the Customer Parameter. For the Grand Total link, pass "ALL" for both Parameters. Then update your Sub-Report Query Where
clause:
我就是这样做的。对于小计链接,为位置参数传递“ALL”,为客户参数传递= Fields!.Customer.Value。对于Grand Total链接,为两个参数传递“ALL”。然后更新您的Sub-Report Query Where子句:
Where
(Customer = @Customer or @Customer = 'ALL')
and (Location = @Location or @Location = 'ALL')
This will return all Customer/Location records when the respective Parameters are set to 'ALL'.
当相应的参数设置为“ALL”时,这将返回所有客户/位置记录。
Let me know if you need any more detail.
如果您需要更多细节,请与我们联系。
#2
2
I don't think you can achieve exactly what you want for your examples 2 and 3 using SSRS alone.
我不认为你可以单独使用SSRS来实现你想要的实例2和3。
I would derive new columns in the Dataset to hold the concatenated parameter strings you want to pass. For your example 2, this column might be called Customer_Locations and hold a value of "USA|Dubai". I would pass that value to a multi-valued parameter in the sub report, using the SSRS Split function in the Subreport Parameter definition. Its important that the chosen delimiter doesn't appear in the possible Location values.
我会在数据集中派生新列来保存您想要传递的连接参数字符串。对于您的示例2,此列可能称为Customer_Locations,其值为“USA | Dubai”。我将使用子报表参数定义中的SSRS拆分功能将该值传递给子报表中的多值参数。重要的是所选分隔符不会出现在可能的位置值中。
The same value would repeat in each row of the Dataset, for all the rows for that Customer.
对于该Customer的所有行,数据集的每一行都会重复相同的值。
For example 3, I would add 2 further columns e.g. Customer_Locations_Grand_Total = "USA|Dubai" and Customers_Grand_Total = "ABC|CDE". These same values would repeat for all rows.
例如3,我会再添加2个列,例如Customer_Locations_Grand_Total =“USA | Dubai”和Customers_Grand_Total =“ABC | CDE”。对于所有行,将重复这些相同的值。