我在iReport中设计了一个报表,它有一个直接查询作为主报表和一个带有另一个简单查询的子报表。这两个查询都没有传递任何参数,但是它们都广泛地处理时间戳。
合并的报告在iReport中运行良好,如果我删除子查询并将两者加载到JasperReports 服务器中,它们将独立运行。但是,当我尝试运行包含子报告的完整报告时,我收到以下错误和堆栈跟踪:
The server has encountered an error. Please excuse the inconvenience.
Error Message
net.sf.jasperreports.engine.JRRuntimeException: Parameter "DATABASE_TIMEZONE" does not exist.
Error Trace
net.sf.jasperreports.engine.JRRuntimeException: Parameter "DATABASE_TIMEZONE" does not exist.
at net.sf.jasperreports.engine.query.JRAbstractQueryExecuter.getValueParameter(JRAbstractQueryExecuter.java:606)
at net.sf.jasperreports.engine.query.JRAbstractQueryExecuter.getValueParameter(JRAbstractQueryExecuter.java:621)
at com.jaspersoft.jasperserver.api.engine.jasperreports.util.JRTimezoneJdbcQueryExecuter.getValueParameter(JRTimezoneJdbcQueryExecuter.java:150)
at com.jaspersoft.jasperserver.api.engine.jasperreports.util.JRTimezoneJdbcQueryExecuter.<init>(JRTimezoneJdbcQueryExecuter.java:134)
at com.jaspersoft.jasperserver.api.engine.jasperreports.util.JRTimezoneJdbcQueryExecuterFactory.createQueryExecuter(JRTimezoneJdbcQueryExecuterFactory.java:50)
at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:728)
at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:629)
at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:1159)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:802)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:746)
at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:640)
at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:59)
at net.sf.jasperreports.engine.fill.JRThreadSubreportRunner.run(JRThreadSubreportRunner.java:205)
at java.lang.Thread.run(Thread.java:619)
据我所知,这是一个已知的错误,但没有受到太多关注。有没有人遇到过这个错误并想出一个解决方法或者至少解释一下发生了什么?