manoj_pan123 Posted July 13, 2007 Share Posted July 13, 2007 Errors were encountered when compiling report expressions class file: [jrc] C:SVN_Currentcsk_posreport.tempDailyRefundTransactionReport_1184315449517_40192.java:277: operator <= cannot be applied to java.math.BigDecimal,java.math.BigDecimal [jrc] value = (java.lang.String)(((((java.lang.String)field_refundTransactionTenderType.getValue()).equals("HOME_OFFICE_CHECK")|| ((java.lang.String)field_refundTransactionTenderType.getValue()).equals("CHECK") || ((java.lang.String)field_refundTransactionTenderType.getValue()).equals("CURRENCY")|| ((java.lang.String)field_refundTransactionTenderType.getValue()).equals("TRAVELERS_CHECK")) && (((java.math.BigDecimal)field_refundTransactionAmount.getValue()) <= ((java.math.BigDecimal)field_refundTransactionItemAmount.getValue()))) [jrc] ^ [jrc] C:SVN_Currentcsk_posreport.tempDailyRefundTransactionReport_1184315449517_40192.java:285: operator > cannot be applied to java.math.BigDecimal,java.math.BigDecimal [jrc] : (((java.lang.String)field_refundTransactionTenderType.getValue()).equals("COUPON")|| (((java.math.BigDecimal)field_refundTransactionAmount.getValue()) > ((java.math.BigDecimal)field_refundTransactionItemAmount.getValue()))) [jrc] ^ [jrc] C:SVN_Currentcsk_posreport.tempDailyRefundTransactionReport_1184315449517_40192.java:655: operator <= cannot be applied to java.math.BigDecimal,java.math.BigDecimal [jrc] value = (java.lang.String)(((((java.lang.String)field_refundTransactionTenderType.getOldValue()).equals("HOME_OFFICE_CHECK")|| ((java.lang.String)field_refundTransactionTenderType.getOldValue()).equals("CHECK") || ((java.lang.String)field_refundTransactionTenderType.getOldValue()).equals("CURRENCY")|| ((java.lang.String)field_refundTransactionTenderType.getOldValue()).equals("TRAVELERS_CHECK")) && (((java.math.BigDecimal)field_refundTransactionAmount.getOldValue()) <= ((java.math.BigDecimal)field_refundTransactionItemAmount.getOldValue()))) [jrc] ^ [jrc] C:SVN_Currentcsk_posreport.tempDailyRefundTransactionReport_1184315449517_40192.java:663: operator > cannot be applied to java.math.BigDecimal,java.math.BigDecimal [jrc] : (((java.lang.String)field_refundTransactionTenderType.getOldValue()).equals("COUPON")|| (((java.math.BigDecimal)field_refundTransactionAmount.getOldValue()) > ((java.math.BigDecimal)field_refundTransactionItemAmount.getOldValue()))) [jrc] ^ [jrc] C:SVN_Currentcsk_posreport.tempDailyRefundTransactionReport_1184315449517_40192.java:1033: operator <= cannot be applied to java.math.BigDecimal,java.math.BigDecimal [jrc] value = (java.lang.String)(((((java.lang.String)field_refundTransactionTenderType.getValue()).equals("HOME_OFFICE_CHECK")|| ((java.lang.String)field_refundTransactionTenderType.getValue()).equals("CHECK") || ((java.lang.String)field_refundTransactionTenderType.getValue()).equals("CURRENCY")|| ((java.lang.String)field_refundTransactionTenderType.getValue()).equals("TRAVELERS_CHECK")) && (((java.math.BigDecimal)field_refundTransactionAmount.getValue()) <= ((java.math.BigDecimal)field_refundTransactionItemAmount.getValue()))) [jrc] ^ [jrc] C:SVN_Currentcsk_posreport.tempDailyRefundTransactionReport_1184315449517_40192.java:1041: operator > cannot be applied to java.math.BigDecimal,java.math.BigDecimal [jrc] : (((java.lang.String)field_refundTransactionTenderType.getValue()).equals("COUPON")|| (((java.math.BigDecimal)field_refundTransactionAmount.getValue()) > ((java.math.BigDecimal)field_refundTransactionItemAmount.getValue()))) [jrc] ^ [jrc] 6 errors Link to comment Share on other sites More sharing options...
codyjasperForge Posted July 13, 2007 Share Posted July 13, 2007 You should cast $F{refundTrasactionAmount} AND $F{refund_TransactionItemAmount} to an 'int' Or a 'double' before applying the .equals() method to them... Try this:Code:... && $F{refund_TransactionItemAmount}.intValue() && Integer.parseInt($F{refund_TransactionItemAmount}) Or something like it. Research the conversion methods used in java, that is what your problem is. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now