glassner Posted April 23, 2010 Share Posted April 23, 2010 I tried to replace the language="groovy" specification in the xml file with langauge="java", but I get compilation errors with iReport 3.7.1.How can I use language="java" without getting the compilation errors ? Thanks ! Link to comment Share on other sites More sharing options...
pablodc Posted April 26, 2010 Share Posted April 26, 2010 Hi, have you tried just removing the language attribute?. Grettings. Link to comment Share on other sites More sharing options...
glassner Posted April 26, 2010 Author Share Posted April 26, 2010 Yes, I have tried to remove language="java" altogether, but I get lots of compile errrors. Link to comment Share on other sites More sharing options...
glassner Posted April 26, 2010 Author Share Posted April 26, 2010 there must be some property that must be set or a library that must be added for iReports to work with language="java" or without it ... Link to comment Share on other sites More sharing options...
glassner Posted April 26, 2010 Author Share Posted April 26, 2010 Here is the error I get if I set language="Java" net.sf.jasperreports.engine.JRException: No report compiler set for language : Java at net.sf.jasperreports.engine.JasperCompileManager.getCompiler(JasperCompileManager.java:504) at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:215) at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:131) at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:509) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)Compilation running time: 249! Link to comment Share on other sites More sharing options...
pablodc Posted April 27, 2010 Share Posted April 27, 2010 Have you set the language as "java" or "Java"?, can be a case mistake? Link to comment Share on other sites More sharing options...
rakeshenoch Posted April 27, 2010 Share Posted April 27, 2010 Easiest way is to right click on the report name -> Properties -> Scroll down to set the preferred language (Java, JavaScript or Groovy). Link to comment Share on other sites More sharing options...
glassner Posted April 27, 2010 Author Share Posted April 27, 2010 Followed your advice, but still errors. It seems that by setting language="Java", the report expressions would have to be rewritten differently. Is the change from language="groovy" to language="java" expected to be seemless ?Compilation exceptions: com.jaspersoft.ireport.designer.compiler.ErrorsCollector@ee06benet.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:C:\bin\IReport3.7.1\iReport-3.7.1\AAD32Quota32Comparison_1272373563968_760460.java:225: operator + cannot be applied to java.math.BigDecimal,java.math.BigDecimal(((java.math.BigDecimal)variable_TotalACTUAL_DEGREE_QTY.getValue())== null ? new BigDecimal("0.0") : ((java.math.BigDecimal)variable_TotalACTUAL_DEGREE_QTY.getValue())) + ((java.math.BigDecimal)field_ACTUAL_DEGREE_QTY.getValue()) : //$JR_EXPR_ID=13$ ^C:\bin\IReport3.7.1\iReport-3.7.1\AAD32Quota32Comparison_1272373563968_760460.java:410: operator + cannot be applied to java.math.BigDecimal,java.math.BigDecimal(((java.math.BigDecimal)variable_TotalACTUAL_DEGREE_QTY.getOldValue())== null ? new BigDecimal("0.0") : ((java.math.BigDecimal)variable_TotalACTUAL_DEGREE_QTY.getOldValue())) + ((java.math.BigDecimal)field_ACTUAL_DEGREE_QTY.getOldValue()) : //$JR_EXPR_ID=13$ ^C:\bin\IReport3.7.1\iReport-3.7.1\AAD32Quota32Comparison_1272373563968_760460.java:595: operator + cannot be applied to java.math.BigDecimal,java.math.BigDecimal(((java.math.BigDecimal)variable_TotalACTUAL_DEGREE_QTY.getEstimatedValue())== null ? new BigDecimal("0.0") : ((java.math.BigDecimal)variable_TotalACTUAL_DEGREE_QTY.getEstimatedValue())) + ((java.math.BigDecimal)field_ACTUAL_DEGREE_QTY.getValue()) : //$JR_EXPR_ID=13$ ^C:\bin\IReport3.7.1\iReport-3.7.1\AAD32Quota32Comparison_CROSSTAB0_1272373563968_760460.java:162: inconvertible typesfound : java.lang.Object&java.io.Serializable&java.lang.Comparable<? extends java.lang.Object&java.io.Serializable&java.lang.Comparable<?>>required: java.math.BigDecimal value = (java.math.BigDecimal)(((java.math.BigDecimal)variable_ACTUAL_DEGREE_QTYMeasure.getValue()) == null ? "0" : ((java.math.BigDecimal)variable_ACTUAL_DEGREE_QTYMeasure.getValue())); //$JR_EXPR_ID=3$ ^C:\bin\IReport3.7.1\iReport-3.7.1\AAD32Quota32Comparison_CROSSTAB0_1272373563968_760460.java:167: inconvertible typesfound : java.lang.Object&java.io.Serializable&java.lang.Comparable<? extends java.lang.Object&java.io.Serializable&java.lang.Comparable<?>>required: java.math.BigDecimal value = (java.math.BigDecimal)(((java.math.BigDecimal)variable_PROJECTED_DEGREE_QTYMeasure.getValue()) == null ? "0" : ((java.math.BigDecimal)variable_PROJECTED_DEGREE_QTYMeasure.getValue())); //$JR_EXPR_ID=4$ ^C:\bin\IReport3.7.1\iReport-3.7.1\AAD32Quota32Comparison_CROSSTAB0_1272373563968_760460.java:182: inconvertible typesfound : java.lang.Object&java.io.Serializable&java.lang.Comparable<? extends java.lang.Object&java.io.Serializable&java.lang.Comparable<?>>required: java.math.BigDecimal value = (java.math.BigDecimal)(((java.math.BigDecimal)variable_ACTUAL_MANYEARS_QTYMeasure.getValue()) == null ? "0" : ((java.math.BigDecimal)variable_ACTUAL_MANYEARS_QTYMeasure.getValue())); //$JR_EXPR_ID=7$ ^C:\bin\IReport3.7.1\iReport-3.7.1\AAD32Quota32Comparison_CROSSTAB0_1272373563968_760460.java:187: inconvertible typesfound : java.lang.Object&java.io.Serializable&java.lang.Comparable<? extends java.lang.Object&java.io.Serializable&java.lang.Comparable<?>>required: java.math.BigDecimal value = (java.math.BigDecimal)(((java.math.BigDecimal)variable_PROJECTED_MANYEARS_QTYMeasure.getValue()) == null ? "0" : ((java.math.BigDecimal)variable_PROJECTED_MANYEARS_QTYMeasure.getValue())); //$JR_EXPR_ID=8$ ^C:\bin\IReport3.7.1\iReport-3.7.1\AAD32Quota32Comparison_CROSSTAB0_1272373563968_760460.java:192: inconvertible typesfound : java.lang.Object&java.io.Serializable&java.lang.Comparable<? extends java.lang.Object&java.io.Serializable&java.lang.Comparable<?>>required: java.math.BigDecimal value = (java.math.BigDecimal)(((java.math.BigDecimal)variable_ACTUAL_DEGREE_QTYMeasure.getValue()) == null ? "0" : ((java.math.BigDecimal)variable_ACTUAL_DEGREE_QTYMeasure.getValue())); //$JR_EXPR_ID=9$ ^C:\bin\IReport3.7.1\iReport-3.7.1\AAD32Quota32Comparison_CROSSTAB0_1272373563968_760460.java:197: inconvertible typesfound : java.lang.Object&java.io.Serializable&java.lang.Comparable<? extends java.lang.Object&java.io.Serializable&java.lang.Comparable<?>>required: java.math.BigDecimal value = (java.math.BigDecimal)(((java.math.BigDecimal)variable_PROJECTED_DEGREE_QTYMeasure.getValue()) == null ? "0" : ((java.math.BigDecimal)variable_PROJECTED_DEGREE_QTYMeasure.getValue())); //$JR_EXPR_ID=10$ ^9 errors at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:191) at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:215) at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:131) at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:509) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)Compilation running time: 6,832! Link to comment Share on other sites More sharing options...
rakeshenoch Posted April 28, 2010 Share Posted April 28, 2010 Expressions written in Groovy remain invalid when you change the language to Java.Please refer the following link to understand the difference http://jasperforge.org/uploads/publish/ireportwebsite/IR%20Website/iReport_groovy.html .I think you'll have re-write the expressions in Java Link to comment Share on other sites More sharing options...
marjaneh Posted August 13, 2010 Share Posted August 13, 2010 Hi there, could you PLEASE help me here :in iReport3.7.4 I found 2 places that we can set the language one of them is for each report in repot properties and one of them is reportdefault language in iReport , also there are 3 laguages that u can set (groovy,javascript,java) if u set it to groovy and javascript it would have language="groovy" or language="javascript"and it keeps this after save but if u set it to java it doesn't have language="java" and if u yourself add it manualy it would be removed after each save again...so ur report has this error because the language is null"javax.servlet.ServletException: au.com.rmt.ca.exceptions.SystemException: net.sf.jasperreports.engine.JRException: Language "javascript" not supported by this report compiler.Expecting "java" instead." 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