SSR Syntax correction, Can you help ( How do we use the IIF statement )

  • Please see attached. I have highlighted the code that needs change.

    So I only want to display a valid date 

  • you need to evaluate, if true, if false. 

    =IIF(IsDate(Fields!HIST_SRVC_DT.Value)=True), Fields!HIST_SRVC_DT.Value, 0)

    replace my 0 with what happens if your evaluation returns a false value.

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle

  • Incorrect # of parenthesis  count the number of "(" and ")"

  • mw112009 - Wednesday, February 15, 2017 9:09 AM

    Incorrect # of parenthesis  count the number of "(" and ")"

    try =IIF(IsDate(Fields!HIST_SRVC_DT.Value)=True, Fields!HIST_SRVC_DT.Value, 0)
    had one extra ")" after True

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle

  • OK it works but does not resolve my issue....
    MY SSRS report pulls data from IBM DB2. So the null dates are coming as 0001-01-01.

    How ever your IIF statement considers them as valid dates. 
    Is there a way to write the IFF statement to replace bad dates with blank

  • Thanks ... But this worked... I am all set !

    =IIF(((Fields!HIST_SRVC_DT.Value)="0001-01-01"), "", Fields!HIST_SRVC_DT.Value)

Viewing 6 posts - 1 through 5 (of 5 total)

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