【发布时间】:2015-03-12 00:06:45
【问题描述】:
我正在使用 jasper 报告从我的 spring mvc 应用程序生成报告。
只要我不在 jasper 报告中使用任何数学函数,它就可以正常工作。 例如,jasper 报告中的 SUM 函数在我的应用程序上给了我一个编译时错误 -
1. The method SUM(int) is undefined for the type ContentUsageStatisticsReport_1426086372880_332015
value = SUM(((java.math.BigDecimal)field_cnt.getValue()).intValue()); //$JR_EXPR_ID=15$
这是来自 jasper 报告的字段。
<textField>
<reportElement x="210" y="1" width="130" height="20" uuid="45fbed39-f63a-41ff-8ff1-88821aeefcd1"/>
<textFieldExpression><![CDATA[SUM($F{cnt}.intValue())]]></textFieldExpression>
</textField>
这是否意味着我不能在报表中使用 Jasper 函数并且必须在服务器上进行计算?如果是这样,那么我如何计算报告每一页的小计?
【问题讨论】:
标签: java spring-mvc jasper-reports