Jump to content
Changes to the Jaspersoft community edition download ×

scriptlet compiletion error


2004 IR Help

Recommended Posts

By: han - hanit

scriptlet compiletion error

2005-01-25 08:05

Hello everybody

 

its the first time i used scriptlet in my report.

i used asperReports instructions how to do that but got compiletion error which i dont understand.

i have attached the errors:

dori.jasper.engine.JRException:?Errors?were?encountered?when?compiling?report?expressions?class?file: C:iReport-0.2.2FieldDispatch_landscapeT.java:206:?inconvertible?types found???:?dori.jasper.engine.JRAbstractScriptlet required:?com.mfe.reports.reportScriplet ????????????????value?=?(java.lang.String)(((com.mfe.reports.reportScriplet)((dori.jasper.engine.JRAbstractScriptlet)parameter_REPORT_SCRIPTLET.getValue())).convertVal(((java.lang.Double)field_AVE_RESPONSE_TIME.getValue()))); ????????????????????????????????????????????????????????????????????????????^ C:iReport-0.2.2FieldDispatch_landscapeT.java:241:?inconvertible?types found???:?dori.jasper.engine.JRAbstractScriptlet required:?com.mfe.reports.reportScriplet ????????????????value?=?(java.lang.String)(((com.mfe.reports.reportScriplet)((dori.jasper.engine.JRAbstractScriptlet)parameter_REPORT_SCRIPTLET.getValue())).convertVal(((java.lang.Double)field_AVE_FIX_TIME.getValue()))); ????????????????????????????????????????????????????????????????????????????^ C:iReport-0.2.2FieldDispatch_landscapeT.java:459:?inconvertible?types found???:?dori.jasper.engine.JRAbstractScriptlet required:?com.mfe.reports.reportScriplet ????????????????value?=?(java.lang.String)(((com.mfe.reports.reportScriplet)((dori.jasper.engine.JRAbstractScriptlet)parameter_REPORT_SCRIPTLET.getValue())).convertVal(((java.lang.Double)field_AVE_RESPONSE_TIME.getOldValue()))); ????????????????????????????????????????????????????????????????????????????^ C:iReport-0.2.2FieldDispatch_landscapeT.java:494:?inconvertible?types found???:?dori.jasper.engine.JRAbstractScriptlet required:?com.mfe.reports.reportScriplet ????????????????value?=?(java.lang.String)(((com.mfe.reports.reportScriplet)((dori.jasper.engine.JRAbstractScriptlet)parameter_REPORT_SCRIPTLET.getValue())).convertVal(((java.lang.Double)field_AVE_FIX_TIME.getOldValue()))); ????????????????????????????????????????????????????????????????????????????^ C:iReport-0.2.2FieldDispatch_landscapeT.java:712:?inconvertible?types found???:?dori.jasper.engine.JRAbstractScriptlet required:?com.mfe.reports.reportScriplet ????????????????value?=?(java.lang.String)(((com.mfe.reports.reportScriplet)((dori.jasper.engine.JRAbstractScriptlet)parameter_REPORT_SCRIPTLET.getValue())).convertVal(((java.lang.Double)field_AVE_RESPONSE_TIME.getValue()))); ????????????????????????????????????????????????????????????????????????????^ C:iReport-0.2.2FieldDispatch_landscapeT.java:747:?inconvertible?types found???:?dori.jasper.engine.JRAbstractScriptlet required:?com.mfe.reports.reportScriplet ????????????????value?=?(java.lang.String)(((com.mfe.reports.reportScriplet)((dori.jasper.engine.JRAbstractScriptlet)parameter_REPORT_SCRIPTLET.getValue())).convertVal(((java.lang.Double)field_AVE_FIX_TIME.getValue()))); ????????????????????????????????????????????????????????????????????????????^ 6?errors ????at?dori.jasper.engine.design.JRAbstractJavaCompiler.compileReport(JRAbstractJavaCompiler.java:154) ????at?dori.jasper.engine.design.JRDefaultCompiler.compileReport(JRDefaultCompiler.java:136) ????at?dori.jasper.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:135) ????at?dori.jasper.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:123) ????at?it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:139) ????at?java.lang.Thread.run(Thread.java:534)

 

anyone can help?

 

thanks

 

 

 

 

By: Mike Warne - mwarne

RE: scriptlet compiletion error

2005-01-26 15:54

In your scriptlet, Are you trying to set a variable of type String.. using a double type field? If so set your jasper variable to type Double, of if you want to use a string.. in your scriptlet convert the Double field to String.. eg String.valueOf(xyz.doubleValue())

 

 

 

 

 

By: David Lim - aberrant80

RE: scriptlet compiletion error

2005-01-26 21:39

Somehow, I don't think the problem is String, considering the error message is not complaining about string...

 

How did you define your ReportScriptlet class? Did you extend from the right class?

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