如何在一个报表中多次运行子报表?

时间:2016-02-02 20:44:21

标签: reporting-services ssrs-2008 instance reporting ssrs-2008-r2

是否有办法为参数列表中的每个实例运行子报表?我的子报表只设计一个参数,我只想在一个报表中多次返回子报表。

1 个答案:

答案 0 :(得分:1)

You can "tablefy" your parameter list :

  1. Create a query that will un-pivot your param list as a TABLE(INT).
    EX:

    SELECT IDField FROM
     dbo.TableValueFunctionToSplitCommaDelimitedListIntoTableOfInts(@MultiValueListParam)
    
  2. Add a table or matrix your report.

  3. Add a DataSet and set the result to the sp or query created in step 1.
  4. Set the DataSet of the table in step 2 to the DataSet created in step 3.
  5. Insert the SubReport into the detail of the new table.

This should print once per detail band. You can set the parameter to Fields!IDValue.Value