intive-FDV / DynamicJasper

Dynamic Reports using Jasper Reports
http://intive-fdv.github.io/DynamicJasper/
GNU Lesser General Public License v3.0
241 stars 128 forks source link

DynamicJasper Groups with Grand Total #141

Open vbini21 opened 1 year ago

vbini21 commented 1 year ago

I want to have the grand total below the group totals. Been trying it out for long and its still not working. My code is as below

GroupBuilder gb1 = new GroupBuilder(); DJGroup g1 = gb1.setCriteriaColumn((PropertyColumn) columnCategory) .setGroupLayout(GroupLayout.VALUE_IN_HEADER) .addFooterVariable(columnAmount, DJCalculation.SUM) .setFooterVariablesHeight(new Integer(20)) .setFooterHeight(new Integer(50), true) .setHeaderVariablesHeight(new Integer(35)) .setDefaultHeaderVariableStyle(titleStyle) .build(); GroupBuilder gb2 = new GroupBuilder(); DJGroup g2 = gb2.setCriteriaColumn((PropertyColumn) columnSummation) .addFooterVariable(columnAmount, DJCalculation.SUM) .build();

report1.getReportBuilder().addGroup(g1); report1.getReportBuilder().addGroup(g2);

Any assistance?