报告未在JasperReports Server中运行

时间:2014-04-28 12:36:02

标签: php jasper-reports jasperserver

我正在尝试在我的 JasperReports服务器上运行我在 iReport 中设计的报告。但是当我尝试运行报告时,我收到以下错误。

  

错误消息

     

填写报告错误跟踪错误

     

com.jaspersoft.jasperserver.api.JSException:填写报告时出错   com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl $ FillResultListener.reportFillError(EngineServiceImpl.java:1233)   在   net.sf.jasperreports.engine.fill.BaseFillHandle.notifyError(BaseFillHandle.java:211)   在   net.sf.jasperreports.engine.fill.BaseFillHandle $ ReportFiller.run(BaseFillHandle.java:135)   在   com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl $ SynchronousExecutor.execute(EngineServiceImpl.java:880)   在   net.sf.jasperreports.engine.fill.BaseFillHandle.startFill(BaseFillHandle.java:165)   在   com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl $ AsynchronousReportFiller.fillReport(EngineServiceImpl.java:836)   在   com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.fillReport(EngineServiceImpl.java:1702)   在   com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl $ ReportFill.runWithDataSource(EngineServiceImpl.java:1057)   在   com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl $ ReportFill.runReport(EngineServiceImpl.java:991)   在   com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl $ ReportRunnable.run(EngineServiceImpl.java:902)   在   java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)   在   java.util.concurrent.ThreadPoolExecutor中的$ Worker.run(ThreadPoolExecutor.java:615)   在java.lang.Thread.run(Thread.java:724)引起:   net.sf.jasperreports.engine.JRException:准备语句时出错   执行报告查询:select * from   sp_report_projectwise('?','?','?')at   net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createStatement(JRJdbcQueryExecuter.java:372)   在   net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:196)   在   com.jaspersoft.jasperserver.api.engine.jasperreports.util.JRTimezoneJdbcQueryExecuter.createDatasource(JRTimezoneJdbcQueryExecuter.java:168)   在   net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:1112)   在   net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:689)   在   net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:1281)   在   net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:900)   在   net.sf.jasperreports.engine.fill.BaseFillHandle $ ReportFiller.run(BaseFillHandle.java:120)   ... 10更多引起:org.postgresql.util.PSQLException:列   index超出范围:1,列数:0。at   org.postgresql.core.v3.SimpleParameterList.bind(SimpleParameterList.java:51)   在   org.postgresql.core.v3.SimpleParameterList.setLiteralParameter(SimpleParameterList.java:112)   在   org.postgresql.jdbc2.AbstractJdbc2Statement.bindLiteral(AbstractJdbc2Statement.java:2174)at at   org.postgresql.jdbc2.AbstractJdbc2Statement.setInt(AbstractJdbc2Statement.java:1212)   在   org.apache.commons.dbcp.DelegatingPreparedStatement.setInt(DelegatingPreparedStatement.java:116)   在   net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.setStatementParameter(JRJdbcQueryExecuter.java:520)   在   net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.setStatementParameter(JRJdbcQueryExecuter.java:399)   在   net.sf.jasperreports.engine.query.JRJdbcQueryExecuter $ 1.访问(JRJdbcQueryExecuter.java:332)   在   net.sf.jasperreports.engine.query.JRAbstractQueryExecuter $ QueryParameter.accept(JRAbstractQueryExecuter.java:157)   在   net.sf.jasperreports.engine.query.JRAbstractQueryExecuter.visitQueryParameters(JRAbstractQueryExecuter.java:646)   在   net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createStatement(JRJdbcQueryExecuter.java:317)   ......还有17个

1 个答案:

答案 0 :(得分:0)

问题是参数放在单引号内。对于phpjasperxml类,参数应该用单引号括起来,其中至于在jasper服务器中运行单引号不应该在那里。我删除了引号并且它有效。