SYMPTOM:
The attribute form expression is defined as follows:
Sql
ApplySimple("case when #0 < '27.07.2012' then 3
when #0 between '27.07.2012' and '27.07.2013' then 2
else 1 end", )
When running the report in Developer, the following error is returned:
Sample Code/Error
The conversion of a varchar data type to a datetime data type resulted in an out-of-range value

CAUSE:
The datetime format of the date column on warehouse database side is not the same as the one specified in ApplySimple statement.
ACTION:
Use the datetime format defined on warehouse database side in the ApplySimple statement.
For instance, if the datetime format is defined as yyyy-mm-dd on warehouse database side, the form expression needs to be modified as follows:
Sql
ApplySimple("case when #0 < '2012-07-12' then 3
when #0 between '2012-07-12' and '2013-07-12' then 2
else 1 end", )