7
votes

I am new to Sql Server Reporting Services. I have created my following report. I want to remove/hide rows of Brand Total whenever it does not exist in Brand list. Like in following picture i want to remove/hide "Ethnic Total" whereas "Ethnic" Brand does not exist in "Sample Store 1". Similary i want to reomve/hide rows of "Outfitters Total" and "Junior Total" from Section Two whereas "Outfitters" and "Junior" don't exist in "Sample Store 2".
My Sample Report

This is the structure of my report. Report Structure

And following is the expression for Net Qty of a Single Brand total.

=Sum(IIf(Fields!Brand.Value = "Outfitters", Fields!Quantity.Value, Nothing))

What should i do? What condition should i write in expression for Row Visibility?

Thanks in Advance for help.

4

4 Answers

6
votes

i hope the below comments you are looking for.

Step 1: select that particular row (Outfitlers Total, Junior Total,Ethnic Total,Store Total) One at a time and right click and select Row Visibility Option.

Step 2 : A Dialog box appears with 3 options

1.Show
2.Hide
3. Show or hide based on expression

Select option 3 and copy the below expression in the Expression dialog box.

=iif((Sum(IIf(Fields!Brand.Value = "Outfitters", Fields!Quantity.Value, Nothing))) is nothing ,True,False)

i hope So this will be helpful.

4
votes
=IIF(Fields!TotalRems.Value=0, True, False)

Replace TotalRems with your correct field name

3
votes

You can do this way:

=IIF(Fields!YourField.Value like "YourValue",false,true)

Replace "YourField" with your own one and also change "YourValue" to whatever you need.

NB, " " or '' not treated as NOTHING,

For more explanation: SSRS – Hide Rows in a Group based on a Value

3
votes

another possibility for the hiding expression is, to use a text box reference. In place of "Textbox1" in the expression below, you can use the name of the text box, which is in the crossing of column "Net Qty" and row "Ethnic Total" (or one of the other total rows you mentioned)

=Iif(IsNothing(ReportItems!Textbox1.Value),True,False)