Posted: 4/3/2012
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?
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!)
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
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?
ya
how to do that,i m just stuck here
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.
=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.
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
thanks its working