Jump to content
Changes to the Jaspersoft community edition download ×

Compile error:Cannot cast from int to Integer


Recommended Posts

By: patoots - patoots

Compile error:Cannot cast from int to Integer

2006-05-02 22:32

Hi,

 

Am getting a compilation error in JasperReports:

 

Errors compiling .Retail Account Balance Report.jasper!

it.businesslogic.ireport.ReportClassLoader@185b0ec net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file: 1. Cannot cast from int to Integer value = (java.lang.Integer)(1); <--------------------> 2. Cannot cast from int to Integer value = (java.lang.Integer)(1); <--------------------> 3. Cannot cast from int to Integer value = (java.lang.Integer)(0); <--------------------> 4. Cannot cast from int to Integer value = (java.lang.Integer)(0); <--------------------> 5. Cannot cast from int to Integer value = (java.lang.Integer)(1); <--------------------> 6. Cannot cast from int to Integer value = (java.lang.Integer)(1); <--------------------> 7. Cannot cast from int to Integer value = (java.lang.Integer)(1); <--------------------> 8. Cannot cast from int to Integer value = (java.lang.Integer)(0); <--------------------> 9. Cannot cast from int to Integer value = (java.lang.Integer)(0); <--------------------> 10. Cannot cast from int to Integer value = (java.lang.Integer)(1); <--------------------> 11. Cannot cast from int to Integer value = (java.lang.Integer)(1); <--------------------> 12. Cannot cast from int to Integer value = (java.lang.Integer)(1); <--------------------> 13. Cannot cast from int to Integer value = (java.lang.Integer)(0); <--------------------> 14. Cannot cast from int to Integer value = (java.lang.Integer)(0); <--------------------> 15. Cannot cast from int to Integer value = (java.lang.Integer)(1); <--------------------> 15 errors at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:193) at net.sf.jasperreports.engine.design.JRDefaultCompiler.compileReport(JRDefaultCompiler.java:104) 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:473) at java.lang.Thread.run(Unknown Source)

 

Can anyone tell me which part of the app should I take a look at? I've already peeked through my fields, report queries and it seems the problem does not lie there. Should there be anything else I should be looking at?

 

Need your help urgent.

 

Thank you

 

 

 

 

By: Sanjeev Saha - sanjeevsaha

RE: Compile error:Cannot cast from int to Int

2006-05-02 23:09

Use:

 

new Integer(n)

 

Where 'n' is any number that is being used in the report instead of just declaring the integer value.

 

hth,

Sanjeev

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...