SSRS 将多个字符串参数传递给另一个报告

问题描述:

我已经阅读了一些关于此问题的其他帖子,但不幸的是无法让它工作.

I have read some other posts about this problem, but couldn't get it to work unfortunately.

我有 2 份 SSRS 报告.第一个报告采用多个字符串参数,运行选择查询,并显示一些行.然后我有一个去报告"将值传递给子报表并运行更新查询以更新行的操作.

I have 2 SSRS reports. The first report take a multiple string parameters, runs a select query, and present some rows. Then I have a "Go to Report" Action that pass the values to a sub report and run an update query to update the rows.

将多值参数传递给我使用的另一个报告时=join(Parameters!ponum.Value,",") 但子报告仅将该参数识别为 1 个值.子报表上的参数已设置为允许多个值.

When passing the multiple value parameter to another report I used =join(Parameters!ponum.Value,",") but the sub report only recognize the parameter as 1 value. The parameter on the sub report has set to allow multiple value already.

我想传递的值的类型是a-01"、b-02"、d01-293".但是,当传递给另一个报告时,参数变为 a-01, b-02, d01-293

The type of values I want to pass is like 'a-01', 'b-02', 'd01-293'. However, when passed to another report the parameter becomes a-01, b-02, d01-293

我试图通过 = "'";+ join(Parameters!ponum.Value,"','") + "'";但还是失败了.

I tried to pass with = "'" + join(Parameters!ponum.Value,"','") + "'" but still fails.

还有其他方法可以做到这一点吗?

Is there any other ways I can do this?

谢谢

如果您的子报表参数与主报表参数一样是多值的,那么您只需在子报表属性中将参数值设置为主报表的参数即可.

If your subreport's parameter is multi-value like your main report parameter then in the subreport properties all you do is set the parameter value to your main report's parameter.

所以如果我们有一个带有名为 PoNum 的参数的 MainReport 并且它是多值的.然后我们有mySubReport,参数为subPONums,然后在主报表的子报表占位符中,将参数值设置为[@PoNum]

So if we have MainReport with a parameter called PoNum and it is multi-value. Then we have mySubReport with a parameter of subPONums for example then in the subreport placeholder in the main report, set the parameter value to [@PoNum]

整个参数对象将传递给子报表.

The entire parameter object will be passed to the subreport.