Creating a report in SSRS
2008 that collaborates other sub reports. These Sub Reports will show up with
some conditions. If Sub Reports are not satisfying condition its showing empty.
I'd like to be able to exclude this from the master report so it does not leave
a blank page.
Struggled 1 day and got the
solution.
Resolution:
Place the sub report into a
rectangle. Then set the visibility of the rectangle expression as
=iif(First(Fields![Field1].Value,
"[SubReportDataSet]") IS NOTHING, TRUE, FALSE)
Add New Dataset to Main Report as
[SubReportDataSet] is a Dataset of Sub Report used to populating the subreport.
If the subreport is empty, then [SubReportDataSet] will also be empty, and the
field [Field1] will be equal to NOTHING.
Note: The SQL server will be sending
the same information twice, once to check is subreport dataset has any Data from
the Main Report, and again to populate the date in subreport.