我的报告基于此请求:
select "Annee" ,"Diam", sum("Consommation") from "Consom_N","CptDim"
where "Annee" >= $P{a1} and "Annee" <= $P{a2}
and "Consom_N"."NumCpt"="CptDim"."NumCpt"and "District"= $P{dst}
and $X{IN, cast("Diam" as character varying), DiamRQn}
group by "Annee","Diam"
order by "Annee"
;
“Diam”字段是一个smallint,问题出在这部分
$X{IN, cast("Diam" as character varying), DiamRQn}
DiamRQn 是控制输入使用的参数,它是来自请求的多项选择,当删除铸造时它说:
PSQLException: ERROR: operator does not exist : smallint = character varying
在 ireport preview 中投射它可以正常工作,但在 jasperserver 上,图表显示“Diam”的所有值,选中和未选中。据我了解,对于 jasperserver,铸造的“diam”始终存在于“DiamRQn”集合中,尽管 ireport 一切正常!
附加信息:DBMS:postgresql ireport 版本:5.0.1