Two datasets inside a same tablix


  • Using SSRS , need to generate report, here i have two datasets one for main display & second dataset for displaying 2 sub categories of first datasets.

    So the output will be, first dataset's each row may or may not contain its respective 2 sub categories[second dataset].

    so here i need to display main row with its repective 2 sub catgories if present for that main row.

    Any idea of how to display as Main dataset as Parent row with its repective 2 sub categories row next to it if present

    two datasets used also is their possible to display with two tablix , one tablix present inside other or so

    sample output :

    1 , parent row1
    Child 1
    child 2
    parent row2 ----- in case of no child , child 6, child 7 will not be displayed , only Parent row2 alone displayed
    Child 6
    child 7
    parent row3
    Child 3
    child 4
    Wednesday, August 14, 2013 5:35 PM


  • Hi,

    According to your description,the data from parent row and child row are from different dataset, right? In current release of Reporting Services, each tablix can contains only one dataset. So in your scenario, the easiest way to achieve your requirement is combining the two datasets into one using Join in the query if it is possible. If the datasets cannot be combined, we can use the following methods as the workarounds.

    Method1: Use subreport to display one report in another report

    1.Create another report as the subreport and insert the child row data.
    2.Create a parameter named ID in the subreport.
    3.In the main report, right-click to insert a subreport in the child row.
    4.Right-click the subpeort to open the Subreport Properties, and select the subreport name in the drop-down list.
    5.In the left panel of the Subreport Properties dialog box, click Parameters.
    6.Select Name in the drop-down list of ID, and select [ID] in the drop-down list of Value.

    Method2: Use lookupset function in SSRS 

    In the Expression dialog box, modify the expression to look like this:


    The following screenshot is for your reference(The tablix is to use DataSet1):


    If you have any questions, please feel free to ask.

    Katherine Xiong

    Sunday, August 18, 2013 10:21 AM
  • Thursday, August 15, 2013 4:05 AM

All replies