我想对Ireport变量转换中基于有薪或无薪列的休假时间进行求和
Ex:
Leave hrs | Paid?
8 | Y
8 | Y
9 | N
我的变量表达式是这个
($F{paid}.equals("Y"))? $F{total_hours} : new Double(0.0)
我希望得到16个结果。
这是错误
net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
1. The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files
value = (((java.lang.String)field_paid.getValue()).equals("Y") ? ((java.lang.Double)field_total_hours.getValue()) : 0); //$JR_EXPR_ID=11$
<--------------------------------------------------->
1 errors