Jump to content
Changes to the Jaspersoft community edition download ×

Compiling Error in iReport


montero

Recommended Posts

Hello world. I am new to the Jasper world and need some guidence. I am using iReport and am getting the following error msg on one of my reports during trying to compile it. My report sql is fine and the field elements show up in iReport.

 

here's my error:

 

 

errors were encountered when compiling report expressions class file: 1. Cannot cast from String to Number value = (java.lang.Number)(((java.lang.String)field_VERSION.getValue())); <--------------------------------------------------------------> 2. Cannot cast from String to Number value = (java.lang.Number)(((java.lang.String)field_REPORT_DATE.getValue())); <------------------------------------------------------------------> 3. Cannot cast from BigDecimal to String value = (java.lang.String)(((java.math.BigDecimal)field_WEEKLY_ACTIVE.getValue())); <------------------------------------------------------------------------> 4. Cannot cast from String to Number value = (java.lang.Number)(((java.lang.String)field_VERSION.getOldValue())); <-----------------------------------------------------------------> 5. Cannot cast from String to Number value = (java.lang.Number)(((java.lang.String)field_REPORT_DATE.getOldValue())); <---------------------------------------------------------------------> 6. Cannot cast from BigDecimal to String value = (java.lang.String)(((java.math.BigDecimal)field_WEEKLY_ACTIVE.getOldValue())); <---------------------------------------------------------------------------> 7. Cannot cast from String to Number value = (java.lang.Number)(((java.lang.String)field_VERSION.getValue())); <--------------------------------------------------------------> 8. Cannot cast from String to Number value = (java.lang.Number)(((java.lang.String)field_REPORT_DATE.getValue())); <------------------------------------------------------------------> 9. Cannot cast from BigDecimal to String value = (java.lang.String)(((java.math.BigDecimal)field_WEEKLY_ACTIVE.getValue())); <------------------------------------------------------------------------> 9 errors at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:193) at net.sf.jasperreports.engine.design.JRDefaultCompiler.compileReport(JRDefaultCompiler.java:105) 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:529) at java.lang.Thread.run(Thread.java:595)

 

Post edited by: rubedogg04, at: 2007/02/27 00:01

Post edited by: rubedogg04, at: 2007/02/27 00:38

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

This problem is most likely the data type you are using on the report. The field from your query is one type and the field on the report is a different type. To change the type in the report, you have to create a variable and change the type in the variable. If all of the data types match, check an varibles and the field to display them, same kind of issue. One other place to check. If you changed the data type of a field in the query, you could get this kind of error.

 

Brennan

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