Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSRS 2008:How to hide a table row (Conditionally) based on category field

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.

like image 390
almond eyes Avatar asked Jan 07 '14 06:01

almond eyes


2 Answers

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.

like image 153
Kishore Avatar answered Oct 01 '22 18:10

Kishore


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

Replace TotalRems with your correct field name

like image 27
Rodgers Kilonzo Avatar answered Oct 01 '22 19:10

Rodgers Kilonzo