swathi.reddys2008 Posted November 17, 2012 Share Posted November 17, 2012 HiiAm trying to multiply the field in ireport 3.7.5. I gave the feild eepression as"new Double(($F{totallines}.multiply(new java.math.BigDecimal("0.12"))).toString())+new Double(($F{totallines}.multiply(new java.math.BigDecimal("0.024"))).toString())+new Double(($F{totallines}.multiply(new java.math.BigDecimal("0.012"))).toString()+$F{totallines})"But it genenrating errors ....... "the operator + is undefined for the argument types double,bigdecimal and"the method multiply(bigdecimal) is undefined for double"these the issues am facing, can you provide me a solution, please its urjent Link to comment Share on other sites More sharing options...
sanbez Posted November 20, 2012 Share Posted November 20, 2012 replace "new Double(($F{totallines}" to new "BigDecimal(($F{totallines}" in all occurences. Method multiply is not applicable for Double.class, оnly for BigDecimal. Which type of field $F{totallines} ? If this = java.lang.int, then replace last $F{totallines}) to Integer.toString($F{totallines) If this = java.lang.Integer replace last $F{totallines} to $F{totallines}.toString() 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