如何计算报告中的累积字段值 [英] How to calculate cumulative field values in report

查看:130
本文介绍了如何计算报告中的累积字段值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 JasperReports iReport 的新手,我遇到了问题。在回答问题之前,首先请看下面的图片:

I am new to JasperReports and iReport, and I am facing a problem. Before going through the question, first, please take a look at the following image:

因此,主要问题在于累积列。每个人说,累积账单列应按顺序显示以下值:

So, the main problem is with the cumulative columns. Per say, the "Cumulative Bill" column should show the following values sequentially:

6000.0,14000.0,23000.0,32800.0,42008和45800.0

6000.0, 14000.0, 23000.0, 32800.0, 42800.0 and 45800.0

我不知道如何做到这一点。我尝试创建一个新变量,但那里没有累积类型计算。请帮助我。

I have no idea how this can be done. I tried creating a new variable, but there is no cumulative type calculations there. Please assist me.

推荐答案

使用calculate = Sum和Variable expression = $ F {BillAmountField}创建变量$ V {variableName}将带有此变量的文本字段放入详细信息部分。

Create variable $V{variableName} with calculation = Sum and Variable expression = $F{BillAmountField} and put text field with this variable into detail section.

这么难吗? :)

这篇关于如何计算报告中的累积字段值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆