I am trying to hide a group header (table row) based on the value of that group, but have not been able to get it working.
Let's say I have 2 groups in my table:
Group 1: State
Group 2: City
I want to hide the group header (tablerow2) where State = "Unknown" but I want the Group 2 cities to still display - just w/o a header.
I tried putting the following expressions on the hidden property of tablerow2 with no luck:
First I tried referencing the field that it's grouped on:
=Iif((Fields!state.Value = "Unknown", true, false)
I also tried refereing the name of the group:
=Iif(("State_GRP" = "Unknown"), true, false)
In both cases, nothing gets hidden - all rows, including the group header that says "Unknown", are visible.
Any help would be greatly appreciated!
Kathleen
You are doing this correctly, and I was not able to reporduce the behavior--it works as you are thinking. I would make sure that the case of "Unknown" is consistent with the field value. I would do this in the expression (or change the query to do the trimming), so that case and extranious white space is not a factor.
=IIF(Fields!state.Value.Trim().ToLower()="unknown", true, false)
Ian
|||Thanks Ian - the trim/tolower seemed to resolve whatever issue I was having.
No comments:
Post a Comment