JRossi Posted May 18, 2007 Share Posted May 18, 2007 I am not sure if this is really an iReport question, or a JasperReports Question. I have a simple report which I created in iReport 1.3.3. It compiles, and runs without a problem in iReport. I am trying to compile and run the report from a ColdFusion app by calling JasperCompileManager.compileReport and passing it the path to my jrxml file. However under ColdFusion I am getting the following compile error "inconvertible types found : int required: java.lang.Integer value = (java.lang.Integer)(1);" The thing I noticed is that the java file created by iReport, and the java file created by my code differ slightly and this is what is causing the compile rror in ColdFusion. iReport creates the following function for evaluate and similar code for evaluateOld, and evaluateEstimated Code: public Object evaluate(int id) throws Throwable { Object value = null; switch (id) { case 0 : { value = (java.lang.Integer)(new Integer(1));/*$JR_EXPR_ID=0$*/ break; } .... default : { } } return value; } and compiling it with JasperCompileManager.compileReport in code produces the following version of evaluate, with evaluateOld, and evaluateEstimated being similar. Code:[code] public Object evaluate(int id) throws Throwable { Object value = null; switch (id) { case 0 : { value = (java.lang.Integer)(1); break; } .... default : { } } return value; } Is there a way to make JasperCompileManager.compileReport generate the same code as when it is compiled in iReport? I looked through all the docs, and tried searching through the forums, but don't see anything that should cause this difference. JohnPost edited by: JRossi, at: 2007/05/18 03:23 Link to comment Share on other sites More sharing options...
svenn Posted May 18, 2007 Share Posted May 18, 2007 iReport is a visual report builder/designer. Jasper Reports is the reporting engine. Why are you compiling the report before you run them? Why not run the jasper complied files? 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