views:

2324

answers:

3

In a matrix report is it possible to hide a column based on value of the parent group? For example, I've got a column called "value" which I'd like to hide when the column group that contains it has a specific value.

A: 

Hi,

Yes this is possible. It would involve writing an expression for the Visibility property for the data cell. The expression should include the InScope() function to ensure that the right column is being hidden. The expression would also reference ReportItems!textboxofcolumn.value (looking for that specific value you're after).

Go here for more on the InScope() function

Let me know if you need a hand with the expression.

lukehayler
Unless I'm mistaken, you'll just be left with a blank column representing the column you are trying to hide, rather than actually removing the column
adolf garlic
A: 

I think you'll need to remove the rows from the dataset in SQL or filter them out in RS.

adolf garlic
+1  A: 

Yes it is possible. It you click on the group and edit its properties under the Visibility tab you can the visibility using an expression. For example I have a report that has a detail group and a valuetype group and I would like to only show value groups that have data in them.

I do that by setting the visibility expression for the group to the following:

=CountDistinct(Fields!ValueType.Value,"matrix1_Detail")=1 OR Max(Abs(code.GetValue(Fields!Value)))=0

When the expression code evaluates to true the column is hidden.

Zaid Zawaideh
sounds just about right to me.
DForck42