1

我使用JasperReports 4.7iReport 4.7.1PostgreSQL 8.4作为数据库后端。

在使用类似于以下的查询进行报告时

(select * from table1)
union
(select * from table1)

我发现iReport 会做报告,但是当我将报告上传到JasperReport 服务器时,我得到了An error has occurred. Please contact your system administrator. (6632)

我将查询重写为

select *
from (
(select * from table1)
union
(select * from table1)
) t

它适用于iReportJasperReports

所以,问题是,我错过了什么还是我需要配置什么?

4

1 回答 1

1

我认为这是因为“新”(自 4.5 版起)安全功能。SQL 查询在服务器上执行时应以 select 开头。(您的查询以“(”)开头尝试禁用安全检查,用于测试:

security.validation.sql.on=false

在:

webapps/jasperserver/WEB-INF/classes/esapi/security-config.properties
于 2013-07-13T07:35:49.517 回答