int rowSize = 0;
ReportContentString contentRow = null;
ArrayList row = null;
ArrayList outputRow = null;
Object column = null;
ListElementMember element = null;
int leaderCount = 0;
String previousLeaderValue = null;
String currentLeaderValue = "";
int leaderHeaderIndex = 0;
// current row Amount
float currAmount = 0;
// current leader total Amount
float totalAmount = 0;
// report total Amount
float repAmount = 0;
ReportColumn[] cols = getColumns();
int colNumber = cols.length;
switch (i) {
case 0:
size = res.size();
// set leader line index
leaderHeaderIndex = result.size();
// set header line
result.add(getTableHeader());
for (int j = 0; j < size; ++j) {
row = (ArrayList) res.get(j);
contentRow = new ReportContentString();
outputRow = new ArrayList();
rowSize = row.size();
for (int k = 0; k < rowSize; ++k) {
if ( k < colNumber ) {
column = row.get(k);
element = outputObject(column, getColumnName(k));
if ( cols[k].isVisible() ) {
outputRow.add(element);
}
if ( k == getLeader() ) {
// get leader column value
currentLeaderValue = element.getDisplayString();
}
if ( k == 4 ) {
// total amount
if (column instanceof Float) {
currAmount = ( (Float) column).floatValue();