2004 IR Help Posted August 24, 2006 Share Posted August 24, 2006 By: Betto McRose G, - mcrose error compiling BigDecimal values 2005-12-18 08:28 the three variables are define like BigDecimal, so, I cannot understand which is the problem ingresoNeto: clastype: java.math.BigDecimal calculation time: Nothing reset type: Report variable expresion: $V{totalIngresos}-$V{totalEgresos} totalEgresos and TotalIngresos have no variable expresion because they are returned values from subreports which are also java.math.BigDecimal net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file: 1. The operator - is undefined for the argument type(s) java.math.BigDecimal, java.math.BigDecimal value = (java.math.BigDecimal)(((java.math.BigDecimal)variable_totalIngresos.getValue())-((java.math.BigDecimal)variable_totalEgresos.getValue())); <------------------------------------------------------------------------------------------------------------------> 2. The operator - is undefined for the argument type(s) java.math.BigDecimal, java.math.BigDecimal value = (java.math.BigDecimal)(((java.math.BigDecimal)variable_totalIngresos.getOldValue())-((java.math.BigDecimal)variable_totalEgresos.getOldValue())); <------------------------------------------------------------------------------------------------------------------------> 3. The operator - is undefined for the argument type(s) java.math.BigDecimal, java.math.BigDecimal value = (java.math.BigDecimal)(((java.math.BigDecimal)variable_totalIngresos.getEstimatedValue())-((java.math.BigDecimal)variable_totalEgresos.getEstimatedValue())); <------------------------------------------------------------------------------------------------------------------------------------> 3 errors at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:164) at net.sf.jasperreports.engine.design.JRDefaultCompiler.compileReport(JRDefaultCompiler.java:131) at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:127) at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:109) at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:461) at java.lang.Thread.run(Thread.java:595) By: Johnny A - sykosity RE: error compiling BigDecimal values 2005-12-18 14:22 The operator - is undefined for the argument. I checked out java.math.BigDecimal, found here: http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigDecimal.html instead of having: $V{totalIngresos}-$V{totalEgresos} try: $V{totalIngresos}.subtract($V{totalEgresos}) Hope that helps. (Perhaps if you get the chance you can help me: http://sourceforge.net/forum/forum.php?thread_id=1404663&forum_id=113530) thanks. 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