Jump to content

Calling subreport (language=javascript) in 3.5.x


prosvet

Recommended Posts

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

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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

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/components


I run compilations with the folowing command: ant compileReports -lib ../_jasper/lib

_jasper/lib contains the following jars:

classes12dms.jar
commons-beanutils-1.7.jar
commons-collections-2.1.jar
commons-digester-1.7.jar
commons-logging-1.0.2.jar
dms.jar
groovy-all-1.5.5.jar
iText-2.1.0.jar
jasperreports-3.5.1.jar
jdt-compiler-3.1.1.jar
jfreechart-1.0.12.jar
poi-3.2-FINAL-20081019.jar
servlet.jar
spring-beans.jar
spring-core.jar

and also a sub-directory jdbc:

classes12.jar, ojdbc14dms.jar and ojdbc14.jar

Igor

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...