Skip to Content
avatar image
Former Member

Crystal formula problem

Hi Masters,

I would like to implement this formula in Crystal reports, could you please help me on this issue.

Formula:-

if datevalue({ZSDSO_C014_ZSDSO_C014_Q0001.[4ZSDSO_C014-FORECAST_DAT]}) < DataDate - 60 then 'PRIOR'
else if {ZSDSO_C014_ZSDSO_C014_Q0001.[4ZSDSO_C014-FORECAST_DAT]} > DataDate + 60 then 'FUTURE'
else totext(datevalue({ZSDSO_C014_ZSDSO_C014_Q0001.[4ZSDSO_C014-FORECAST_DAT]}))

But, i am getting error - Error Message - "A string is required here"

Thanks in advance Experts.

Regards,

Bharathi.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Oct 30, 2017 at 11:03 AM

    What data type is this field

    {ZSDSO_C014_ZSDSO_C014_Q0001.[4ZSDSO_C014-FORECAST_DAT]}

    If it is a date then no need for datevalue, if datetime then replace datevalue() with date()

    Ian

    Add comment
    10|10000 characters needed characters exceeded