Skip to Content
0

Crystal formula problem

Oct 30, 2017 at 10:39 AM

16

avatar image
Former Member

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Ian Waterman Oct 30, 2017 at 11:03 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded