final int groupSize = getReport().getGroupCount();
for (int i = 0; i < groupSize; i++)
{
// todo: This is probably not correct.
final RelationalGroup g = (RelationalGroup) getReport().getGroup(i);
writer.writeTag(ExtParserModule.NAMESPACE, ReportDescriptionWriter.GROUP_TAG,
"name", g.getName(), XmlWriterSupport.OPEN);
final List fields = g.getFields();
if (fields.isEmpty() == false)
{
writer.writeTag(ExtParserModule.NAMESPACE, ReportDescriptionWriter.FIELDS_TAG, XmlWriterSupport.OPEN);
for (int f = 0; f < fields.size(); f++)
{
final String field = (String) fields.get(f);
writer.writeTag(ExtParserModule.NAMESPACE, ReportDescriptionWriter.FIELD_TAG, XmlWriterSupport.OPEN);
writer.writeTextNormalized(field, false);
writer.writeCloseTag();
}
writer.writeCloseTag();
}
else
{
writer.writeTag(ExtParserModule.NAMESPACE, ReportDescriptionWriter.FIELDS_TAG, XmlWriterSupport.CLOSE);
}
writeRootBand(ReportDescriptionWriter.GROUP_HEADER_TAG, g.getHeader());
writeRootBand(ReportDescriptionWriter.GROUP_FOOTER_TAG, g.getFooter());
writer.writeCloseTag();
}
writer.writeCloseTag();