I have an error using Jaspersoft Studio with Oracle Database. As soon as there is some data, the following line
<printWhenExpression><![CDATA[$P{REPORT_TYPE}.substring(0,1)=="R"? $F{REASON_DELETED}:$F{REASON_ADOC}]]></printWhenExpression>
throws the following error:
net.sf.jasperreports.engine.JRException: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean
I don't understand, why Jasper Studio would cast it to a Boolean, since it is defined as a String:
<field name="REASON_ADOC" class="java.lang.String"/>
<field name="REASON_DELETED" class="java.lang.String"/>
and the SQL is also fine to me:
NVL(cr.REASON_ADHOC,'-') AS reason_adoc,
NVL(cr.REASON_DELETED,'-') AS reason_deleted,
and also in the view/table:
REASON_DELETED VARCHAR2(250)
REASON_ADHOC VARCHAR2(4000)