column visibility

  • hi

    i need to hide or show column based on expression.

    i created 1 parameter , period

    and has label value

    label1 value1

    label2 value2

    now how to write expression ,in column visibility,

    plz help

  • Which value would you like to be visible?

  • value1

    whats is the expression

    i am writing like this =iif(Parameters!Periods.Value = "value1",FALSE,TRUE)

    doesnt work,give me some error

  • That looks like it should work. What is the error you are getting?

  • i have declared 5 value

    so i m doing like this iif(param.value(0) = "value1" ,false,true)

    for second column iif(param.value(1) = "Value2",false,true)

    it work for first ,but for the second it gives me error like "Index was outside the bounds of the array"

    what to do?

  • Is your parameter a multi-value parameter? If it is not, you should not be using the (0) or the (1). If it is, you should use SPLIT to turn the parameter into a string and then use LIKE instead of =. But then you might run into a problem if both selections are chosen.

  • ok.i have multivalued parameter, i use join and now i am using this as hidden expression

    not field!value1 ,but it gives me error like hidden expression return invalid data type.

    plz explain me whats wrong "not field!value1" .

    thanks

  • Yes, I said SPLIT instead of JOIN. You are correct to use join.

    Please post your entire expression.

  • can you tell me where i need to use split?

    i already posted my expression

  • I said split mistakenly, you were correct to use join.

    I see no expressions posted with Join.

    However, this is something I have used from a multi valued parameter for column visibility and it may be close to what you are looking for:

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

  • thanks a lot,its working

Viewing 11 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply