1
votes

I have a master report in SSRS/SSDT that contains several subreports....I see the Dataset on the master report has the "status" field in there as a field from the stored procedure. I would like to suppress/hide 3 sub reports if the status is '4'. going about it via the UI in SSRS/SSDT.

Goal to use expression to do following: if status = 4 suppress following subreports. rpt 1, rpt2, rpt3 I imagine i would need to modify the UI for the 3 sub reports.

OPTIONS: rclick sub report, select subreport properties - Visibility - show or hide based on an expression fx.

Need Help with the expression.

=IIF(Fields!Status.Value, "4") TRUE, FALSE)
1

1 Answers

2
votes

If the sub report is inside a table or Matrix that has its dataset set to the one containing Status and you are showing the sub report for each row of data then.

=IIF(Fields!Status.Value = "4", TRUE, FALSE)

Otherwise you can use the first value contained in the dataset to make the decision like this.

=iif(First(Fields!Status.Value,"DataSetName") = "4" , TRUE, FALSE)