ssrs 2012 using nested isnothing statements

  • In an ssrs 2012 report, I need to display various messages depending upon if a field is null , if not null then I need to display another message. I know that I can use a switch statement and check for not (isnothing(field1), but I do not know how to set this up in an expression. Could you show when how to at least get the logic started in ssrs?
    Here is what the general logic need to be:
    If Language= Spanish
         if Spanish date is null display message 1
         if Spanish time is null display message 2
        if Spanish location is null display message 3
        else  display good Spanish message    
    end if
    else  if language is not Spanish
        if date is null display message 4,
        if time is null display message 5, 
        if location is null display message 6,
        else display good message.
    end if

  • Pretty sure that this would work, or at least get you started.

    =iif(Fields!Language.Value="Spanish"
        ,Switch(isnothing(Fields!SpanishDate.value)=true,"Message 1"
                ,isnothing(Fields!SpanishTime.value)=true,"Message 2"
                ,isnothing(Fields!SpanishLocation.value)=true,"Message 3"
                ,1=1, "Good Spanish Message")
        ,Switch(isnothing(Fields!Date.value)=true,"Message 4"
                ,isnothing(Fields!Time.value)=true,"Message 5"
                ,isnothing(Fields!Location.value)=true,"Message 6"
                ,1=1, "Good Message")
        )

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

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