简体   繁体   中英

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.

If JobCode = 0 , Show

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

Try this.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM