column visibility using multivalued parameter

Who is online?  0 guests and 0 members
Home  »  Forums   »  microsoft business intelligence   »  reporting services   » column visibility using multivalued parameter

column visibility using multivalued parameter

Topic RSS Feed

Posts under the topic: column visibility using multivalued parameter

Posted: 4/3/2012

Padawan 378  points  Padawan
  • Joined on: 4/3/2012
  • Posts: 189

hi

i need to show column based on selection ,i have 5 values.

i created param like

label1        value1

label2        value2

 

---------

 

now i created another param and used (Join(Parameters!ColumnSelect.Value,",")

now in report ,i right click column->visibility->and expression-?

 

= not fields!value

 

its gives me error like hidden param doesnr return valid data type.

 

Any help?


Posted: 4/3/2012

Padawan 404  points  Padawan
  • Joined on: 7/27/2010
  • Posts: 122

Please describe better:

1. First parameter name and values returned.

2.Why you need second parameter - can't just put values of the first into expression?

The problem can be with value return Nothing( just guess!)


Posted: 4/3/2012

Padawan 378  points  Padawan
  • Joined on: 4/3/2012
  • Posts: 189

no , i cant

coz join actually join array and if i am putting using first param directly

 

like iif(param!value(0) = "sd",false,true)

iif(param!value(1) = "sdd",false,true)

 

it works only for 1 not for more than 1.i have 5 values


Posted: 4/3/2012

Padawan 404  points  Padawan
  • Joined on: 7/27/2010
  • Posts: 122

Am I right?

You have 5 columns on your report and want user to choose which one to show.

For that you use first parameter with allow multiple values to pick up columns to show.

With second parameter you collect values from the first parameter into array and trying to use this array values picking them by index to use in your column visibility expression?


Posted: 4/3/2012

Padawan 378  points  Padawan
  • Joined on: 4/3/2012
  • Posts: 189

ya

 

how to do that,i m just stuck here


Posted: 4/3/2012

Jedi Master 3059  points  Jedi Master
  • Joined on: 2/19/2010
  • Posts: 450

I don't use a second parameter, I just use the multi value parameter.  Here is the column visibility expression I use:

=IIF(InStr(JOIN(Parameters!AdditionalColumns.Value,", "),"ti_auxtime0"),False,True)

In my example above Parameters!AdditionalColumns is obviously my multi-value parameter listing the optional columns.  "ti_auxtime0" is a single value of one of the optional columns that I want to show or hide.  Each optional column must have an expression like this with its specific column name.

 


Posted: 4/3/2012

Padawan 404  points  Padawan
  • Joined on: 7/27/2010
  • Posts: 122

Maybe it some better way, but this one works also.

1. Cleate parameter ColShow:

Integer

Allow multiple values

2. Available Values

Label           Value

1 column      1

2 column      2

3 column      3

4 column      4

5 column      5

3. In the first column visibility expression put: =InStr(Join(Parameters!ColShow.Value,","),"1") = 0

    In the second: =InStr(Join(Parameters!ColShow.Value,","),"2") = 0

and so on until 5


Posted: 4/3/2012

Padawan 378  points  Padawan
  • Joined on: 4/3/2012
  • Posts: 189

thanks its working


Page 1 of 1 (8 items)