Text based on parameters

  • Hello,

    I am looking to display a value in a textbox based on parameters. How can I create an expression to do this?

    Here is what my code looks like:

    =IIf(Parameters!getSource.Value = "emp" and Parameters!ContactType.Value = "phone" , "Phone List", "") Else

    IIf(Parameters!getSource.Value = "emp" and Parameters!ContactType.Value = "cell" , "Cell Phone List", "") Else

    IIf(Parameters!getSource.Value = "emp" and Parameters!ContactType.Value = "email" , "Email List", "")

    End If

    End If

    Thanks in advance!

  • To all:

    I figured it out, needed to use switch statement:

    =SWITCH(

    Parameters!getSource.Value = "emp" and Parameters!ContactType.Value = "ext" , "Phone List",

    Parameters!getSource.Value = "emp" and Parameters!ContactType.Value = "cell" , "Cell Phone List",

    Parameters!getSource.Value = "emp" and Parameters!ContactType.Value = "email" , "Cell Email List"

    )

  • That's Correct..but still you can use IIF to solve problem

    =IIF(Parameters!getSource.Value = "emp" and Parameters!ContactType.Value = "ext" , "Phone List",

    IIF(Parameters!getSource.Value = "emp" and Parameters!ContactType.Value = "cell" , "Cell Phone List",

    IIF(Parameters!getSource.Value = "emp" and Parameters!ContactType.Value = "email" , "Cell Email List"

    )))

    Thanks,

    Dhana.!

Viewing 3 posts - 1 through 2 (of 2 total)

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