我有一个表达式的报告,它与EnglishNumberToWords.jar一起使用。这个.jar将数字转换为单词并在iReport中完美运行,但在我将其作为Web应用程序执行时会出错。 报告没有这个 我做错了什么? 此文本代码字段表达式:
<textFieldExpression><![CDATA[EnglishNumberToWords.convert( $F{ODEMELER_MEBLEG}.intValue() )+" manat "+$F{QEPIQ}+" qpiq"]]></textFieldExpression>
这是错误:
Error occured while displaying report net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression : Source text : EnglishNumberToWords.convert( $F{ODEMELER_MEBLEG}.intValue() )+" manat "+$F{QEPIQ}+" qpiq"
net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:203)
net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:591)
net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:559)
net.sf.jasperreports.engine.fill.JRFillElement.evaluateExpression(JRFillElement.java:966)
net.sf.jasperreports.engine.fill.JRFillTextField.evaluateText(JRFillTextField.java:456)
net.sf.jasperreports.engine.fill.JRFillTextField.evaluate(JRFillTextField.java:440)
net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:259)
net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:455)
net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2044)
net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:778)
net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:288)
net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:151)
net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:909)
net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:822)
net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:61)
net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:446)
net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:407)
net.sf.jasperreports.engine.JasperRunManager.runToPdfStream(JasperRunManager.java:201)
net.sf.jasperreports.engine.JasperRunManager.runReportToPdfStream(JasperRunManager.java:720)
co.gerger.bdf.view.JasperReportsServlet.doGet(JasperReportsServlet.java:106)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
co.gerger.filters.GZIPFilter.doFilter(GZIPFilter.java:48)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
java.lang.Thread.run(Thread.java:722)
答案 0 :(得分:0)
您是否检查过iReport和Server版本是否兼容?
另外,您是否也在服务器端添加了这个jar?