Group band visibilty w/ expression | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Group band visibilty w/ expression

I have an IIF function which determines my second group, "ThreeTitles": =IIF
(
Fields!Title.Value = "Manager" or Fields!Title.Value = "Coordinator" or Fields!Title.Value = "Program Manager", Fields!Person.Value,"ZZZ"
) What I’m trying to figure out is the expression syntax for setting the group to hidden when the condition of "ZZZ" is met.

I’ve tried to work with the group’s visibility expression of: =IIF(ReportItems!txtPerson is "No Mgr" and rownumber("table1_Group1")
> 1,true, False) …..I’m trying to hide the group band if it’s "No Mgr" in txtPerson and the count > 1 I can see the txtPerson value and the rownumber() for the group bands, but can’t get the expression to work correctly.
finally I figured it out by the following expression on the Visibility tab of my 2nd level group "ThreeItems" (table1_Group1 is my top level grouping, and "ThreeItems" is my second level grouping). The field txtPerson is in the "ThreeItems" band. Expression in Visibilty section: =IIF(
rownumber("table1_Group1") > 1 and ReportItems!txtPerson.Value = "No Mgr / RTBF / Prgrm Mgr",True,False) ********** What I wanted to do is search for Titles of only three values. If I got those values, then I would print them, else do "ZZZ" for the grouping…so anything other than those three would be last in the second level grouping. My second level grouping expression was the following: =IIF
(
Fields!Title.Value = "WP Manager" or Fields!Title.Value = "RTBF " or Fields!Title.Value = "Program Manager", Fields!Person.Value,"ZZZ"
) ********** The value I had for ReportItems!txtPerson was the following expression: =IIF
(
Fields!Title.Value = "WP Manager" or Fields!Title.Value = "RTBF " or Fields!Title.Value = "Program Manager", Fields!Person.Value,"No WP Mgr / RTBF / Prgrm Mgr"
) ********** Now that I know "ZZZ" would be last in the grouping, and if the count of this 2nd level grouping was greater than 1 (meaning I did in fact have Title values w/in the three desired first) I would hide this group band.

]]>