Expression in Report Not Working

  • Can any one advise me as to why this expression is not working please?

    =IIf

    (Fields!clockStart.Value > 0, (DateAdd("d",126,Fields!clockStart.Value)) ,"")

    All it returns is #Error.

    All i want to be able to do is apply the 126 days addition to the clockstart date but only to the rows where a clockstart value is present.

    Thanks in advance for any sugestions

  • There's nothing that jumps out at me as incorrect with the syntax of the expression. The only thing I'd wonder about is what happens when Fields!clockStart.Value is NULL. I'd try something like this:

    =IIf(ISNOTHING(Fields!clockStart.Value) = false OR Fields!clockStart.Value > 0, (DateAdd("d",126,Fields!clockStart.Value)) ,"")

    The other thing I try when troubleshooting expressions is adding a textbox to the body of my report and test each part of my expression in that textbox to see which one is causing the error.

  • Many Thanks

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

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