/**
* 功能:添加合计行
*
* @param table
* 指定的KDTable
* @param fields
* 需要合计的列
*/
public static void apendFootRow(KDTable table, String fields[]) {
int size = fields.length;
if (size == 0)
return;
Map sumValue = new HashMap();
// 利用getRowCount的到的行可能不正确
int count = table.getRowCount3();
for (int i = 0; i < fields.length; i++) {
sumValue.put(fields[i], new BigDecimal("0.00"));
}
IRow footRow = null;
KDTFootManager footManager = table.getFootManager();
if (footManager == null) {
footManager = new KDTFootManager(table);
footManager.addFootView();
table.setFootManager(footManager);
}
// 计算所有指定行的合计值