How to get null values?

  • I have searched everywhere but I am not able to find how to handle null values in the expression. I am using SSRS 2005. This is what I have:

    =iif(isNothing(Fields!Weather.Value), "", (LEFT((Fields!Weather.Value), LEN((Fields!Weather.Value)-1))))

    Any suggestion is appreciated!!

  • The problem with ssrs is that all 3 parts of the IIF are calculated BEFORE the iif actually starts.

    What do you need to do exactly?

  • Ya I figured that out. I tried this expression and it worked:

    =iif(LEN(Fields!Weather.Value) = 0,"", LEFT(Fields!Weather.Value, LEN(iif(LEN(Fields!Weather.Value) = 0," ",Fields!Weather.Value))-1))

    Thanks for your reply!

  • Ya, the other solution is to create a little function in the code section. That way you have something reusable.

    usually code makes things slower, but for sanity's sake... 😉

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

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