computedSet.addItem(cs5);
// Header
RowHandle header = (RowHandle) table.getHeader().get(0);
CellHandle tcell = (CellHandle) header.getCells().get(0);
tcell.getWidth().setStringValue("3in");
LabelHandle label = elementFactory.newLabel(null);
label.setText("Order");//$NON-NLS-1$
tcell.getContent().add(label);
tcell = (CellHandle) header.getCells().get(1);
label = elementFactory.newLabel(null);
label.setText("Product");//$NON-NLS-1$
tcell.getContent().add(label);
tcell = (CellHandle) header.getCells().get(2);
label = elementFactory.newLabel(null);
label.setText("Amount");//$NON-NLS-1$
tcell.getContent().add(label);
// Table Group
TableGroupHandle group = elementFactory.newTableGroup();
group.setName("MyGroup");
group.setKeyExpr("dataSetRow[\"ORDERNUMBER\"]");
group.setInterval("none");
group.setSortDirection("asc");
table.getGroups().add(group);
RowHandle groupHeader = elementFactory.newTableRow(3);
tcell = (CellHandle) groupHeader.getCells().get(0);
DataItemHandle data = elementFactory.newDataItem(null);
data.setResultSetColumn(cs1.getName());
tcell.getContent().add(data);
group.getHeader().add(groupHeader);
RowHandle groupFooter = elementFactory.newTableRow(3);
tcell = (CellHandle) groupFooter.getCells().get(2);
data = elementFactory.newDataItem(null);
data.setResultSetColumn(cs5.getName());
tcell.getContent().add(data);
group.getFooter().add(groupFooter);
RowHandle detail = (RowHandle) table.getDetail().get(0);
data = elementFactory.newDataItem(null);
tcell = (CellHandle) detail.getCells().get(1);
data = elementFactory.newDataItem(null);
data.setResultSetColumn(cs2.getName());
tcell.getContent().add(data);
tcell = (CellHandle) detail.getCells().get(2);
data = elementFactory.newDataItem(null);
data.setResultSetColumn(cs3.getName());
tcell.getContent().add(data);
RowHandle footer = (RowHandle) table.getFooter().get(0);
tcell = (CellHandle) footer.getCells().get(2);
data = elementFactory.newDataItem(null);
data.setResultSetColumn(cs4.getName());
tcell.getContent().add(data);
reportDesignHandle.getBody().add(table);
}