bmsqldev
bmsqldev

Reputation: 2735

Hide Columns Based on parameter value not working in SSRS

I have a SSRS report which have N number of Columns. I need to hide Certain columns based on a parameter "jobcode" . I have tried below expression in Column Visibility Pane,

=iif(Parameters!JobCode.Value=1,"False","True")

While Executing the report I got below Error,

"The Hidden Expression used in the tablix 'Tablix1' returned a datatype that is not valid"

I have tried like below,

=iif(Parameters!JobCode.Value=1,0,1)

But, got the same error. Can Anyone help me to find out answers for below queries

  1. How to achieve the above requirement in ssrs?

  2. If I need hide column based on multiple parameter values, say 0 and 1, How to do it?

Thanks for the help.

Upvotes: 0

Views: 1573

Answers (2)

Sajid khan
Sajid khan

Reputation: 615

Follow these steps:

Right click in your column>Column Visibility>Show or hide based on an expression

Expression, use that:

=Parameters!parameter_name.Value<>1

Upvotes: 0

Marco Bong
Marco Bong

Reputation: 690

If JobCode = 0 , Show

   =IIF(CInt(Fields!JobCode.Value) = 0,true,false)

Try this.

Upvotes: 1

Related Questions