Nested IIF Condition not workink in textbox at run time

  • Guyzzz...In my 4th textbox of Row data i m using the condition

    =IIF(Parameters!pDimension.Value = "LoanTypeDimension",Fields!LoanTypeDimension_Loan_Type_Description.Value, IIF(Parameters!pDimension.Value = "StateDimension", Fields!StateDimension_State_Code.Value,IIF(Parameters!pDimension.Value = "InvestorDimension", Fields!InvestorDimension_Investor_Name.Value , Fields!ChannelDimension_Channel_Description.Value))) 

    where pDimension is my parameter argument, This condition is just executed at run time i.e when i go for preview of the report.I m sure it is not related to my main query because,

    =IIF(Parameters!pDimension.Value = "LoanTypeDimension",Fields!LoanTypeDimension_Loan_Type_Description.Value,"111")

    this condition ,which is wrong for my purpose..and all condition which takes

    " abc " in their ELSE argument are executing at run time, while the nested iif is not.

    Guyzz m working since last 5 days on this plzzzz somebody help 

  • I'm not really following where the second IIf statement comes in, or the "abc' bit, but if you're looking to clean up the nested "If's" a little, you could try the switch statement.

    =Switch(Parameters!pDimension.Value = "LoanTypeDimension", Fields!LoanTypeDimension_Loan_Type_Description.Value, Parameters!pDimension.Value = "StateDimension", Fields!StateDimension_State_Code.Value, Parameters!pDimension.Value = "InvestorDimension", Fields!InvestorDimension_Investor_Name.Value, Parameters!pDimension.Value = "ChannelDimension", Fields!ChannelDimension_Channel_Description.Value)

    Note, you must have an even number of arguments (ie divisible by two).

     

    Steve.

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

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