7

I am having trouble showing/hiding a column based on parameter value chosen.

How my report is set up: Parameter: ImportStatus --ImportStatus parameter has three values you can choose from: M, V, E

If I choose ImportStatus value = 'M', then I want the report to display a specific column.

Currently, if I go to Column Visibility screen of a column I want to show/hide, I am able to hide column for all values instead of specific. Any idea how to do this correctly?

My expression:

=IIF(Parameters!ImportStatus.Value = "M",true,false)
Pedram
  • 6,256
  • 10
  • 65
  • 87
NonProgrammer
  • 1,337
  • 2
  • 23
  • 53

1 Answers1

7

The expression

=IIF(Parameters!ImportStatus.Value = "M",true,false)

will give the same result as

=(Parameters!ImportStatus.Value = "M")

The expression you need to give specifies whether or not to hide the column, so to show a column where @ImportStatus = "M", you would simply reverse the logic:

=Not(Parameters!ImportStatus.Value = "M")
SQLDiver
  • 1,948
  • 2
  • 11
  • 14