SSRS - Dynamic Sub-Reports in table(Tablix) for every row

761 Views Asked by At

Scenario:

I have 5 sub-reports (with different layouts). All these sub-reports work fine when called individually in main report.

Based on criteria, I need to show any 1 sub-report. All other remaining sub-reports should be hidden. I thought I could achieve this using a table (Tablix) where I would pass the primary key as parameter to show sub-report.

I have dropped all sub reports on each column as shown below, and setting the column visibility property with an expression like this.

=iif(Fields!RptLayoutNum.Value=1,true,false)

enter image description here

So when 1 is true it will show sub-report 1, 2 will show sub-report 2, etc. So the Final report output will be like this.

enter image description here

However, this is not working. Main report defaults to 1st sub-report layout and I am not able to see other sub-report based on the data. Appreciate if anyone could help.

0

There are 0 best solutions below