locked
How to render "N/A" in fields with empty dates in an existing nested IIF/Is nothing function RRS feed

  • Question

  • User-2132000449 posted

    I have an existing IIF/Is Nothing function in place and want the field to show N/A is there is no dates in my expression:

    IIF(IsNothing(Fields!ActualPR.Value),Fields!ScheduledPR.Value,Fields!ActualPR.Value)

    Is it possible to have it show NA is there is no dates flagged for either Actual or Schedule?

    Thursday, October 12, 2017 5:52 PM

All replies

  • User347430248 posted

    Hi cltran17,

    you can try to use function like below and try to use it in your above condition.

    you can add another iif condition in your true or false part of the main iif condition.

    protected bool CheckDate(String date)
    {
       try
       {
            DateTime dt = DateTime.Parse(date);
            return true;
       } 
       catch
      {
            return false;
      }
    }

    then in if condition , if it returns true you can assign N/A.

    Regards

    Deepak

    Friday, October 13, 2017 1:25 AM