Search code examples
ssrs-2008

iif Function Expressions ( IsNothing Conditioal formating SSRS)


I'm receiving the following output as I try and add in an expression to give me FAIL based on a blank condition.

=iif(Variables!PAT_ID_Count.Value = 0, "PASS", "FAIL", iif(IsNothing(Variables!Summary.Value), "FAIL","" )) I'm getting Too many arguments to 'Public Function IIf(Expression As Boolean, TruePart As Object, FalsePart As Object) As Object'


Solution

  • It sounds like you want PASS if 0, else if it's NULL/NOTHING then FAIL else "". You'll want your second IIF in the ELSE part of your first IIF.

    =iif(Variables!PAT_ID_Count.Value = 0, "PASS", iif(IsNothing(Variables!Summary.Value), "FAIL", ""))