我已经从XML数据源构建了一个报告。我创建了两个嵌套组,我试图计算一列的总和,并将总数放入最深的组页脚区域。
我创建了一个汇总值的变量和一个文本字段,用于将该变量打印到分组的页脚带。但是我得到0.0(我的变量的初始值表达式)作为每个组的列总和。
让我指出一些细节:
- TargetGroup_DURATION: variable that aggregates values from column dur/@val
- Calculation = Sum
- Reset type = Group
- Reset group = Target Group
- Increment type = Group (I've tried also setting this property to Column, Now, and Auto)
- Increment group = Target Group
- Variable expression = NumberFormat.getInstance(new Locale("en", "US")).parse($F{dur/@val}).doubleValue()
- Text field on TargetGroup footer band
- Text field expression: $V{TargetGroup_DURATION}
- Evaluation time: Group (I've tried also Now, Column and Auto)
- Evaluation group: TargetGroup
正如我所说,我无法获得正确的结果。现在有人为了获得正确的结果而设置了适当的值吗?
提前致谢。