prosvet Posted May 5, 2009 Share Posted May 5, 2009 Directly in iReport when trying to preview a report containing subreport:Error filling print... net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression : Source text : new java.lang.Integer(1) net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression : Source text : new java.lang.Integer(1) at net.sf.jasperreports.engine.fill.JRFillSubreport.prepare(JRFillSubreport.java:667) at net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.java:346) Apparently, java.lang.Integer(1) is generated in the .jasper file, but I have not managed to understand why.Igor Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted May 5, 2009 Share Posted May 5, 2009 yeah, iReport may create a similar expression as default in several situations.Can you send the jrxml?By the way, IMHO the best language to use with JasperReports is Groovy, it is very very similar to javascript (pretty much same thing), but it supports native java code (like new java.lang.Integer(1) )Giulio Link to comment Share on other sites More sharing options...
prosvet Posted May 8, 2009 Author Share Posted May 8, 2009 Thank you for advice, Giulio. I have changed for Groovy and now it works. Maybe the reason of the js problem was that in the beginning I had 2.0.2 jars in classpath, so ant was first searching them. Now, I have no jar reference in system variables and it works. Well, almost. When I try to compile reports, I have the following warning (but everything compiles, though): [jrc] 8 mai 2009 14:28:17 net.sf.jasperreports.engine.component.ComponentsEnvironment findComponentBundles [jrc] ATTENTION: Found two components for namespace http://jasperreports.sourceforge.net/jasperreports/componentsI run compilations with the folowing command: ant compileReports -lib ../_jasper/lib_jasper/lib contains the following jars:classes12dms.jarcommons-beanutils-1.7.jarcommons-collections-2.1.jarcommons-digester-1.7.jarcommons-logging-1.0.2.jardms.jargroovy-all-1.5.5.jariText-2.1.0.jarjasperreports-3.5.1.jarjdt-compiler-3.1.1.jarjfreechart-1.0.12.jarpoi-3.2-FINAL-20081019.jarservlet.jarspring-beans.jarspring-core.jarand also a sub-directory jdbc:classes12.jar, ojdbc14dms.jar and ojdbc14.jarIgor Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted May 8, 2009 Share Posted May 8, 2009 Not sure why, it is a JasperRepots thing, but you can ignore it. 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