m_aDoc.setLayoutSectionsVisible(false);
XTextCursor xTextCursor = ReportTextDocument.createTextCursor(m_aDoc.xTextDocument.getText());
xTextCursor.gotoStart(false);
for (int i = 0; i < getRecordParser().GroupFieldNames.length; i++)
{
XNamed xNamedTextSection = addLinkedTextSection(xTextCursor, ReportTextDocument.GROUPSECTION + Integer.toString(i + 1), null, null);
xNamedTextSection.setName(ReportTextDocument.COPYOFGROUPSECTION + (i+1));
renameTableofLastSection(ReportTextDocument.COPYOFTBLGROUPSECTION + (i+1));
}
if( getRecordParser().getRecordFieldNames().length > 0)
{
XNamed xNamedTextSection = addLinkedTextSection(xTextCursor, ReportTextDocument.RECORDSECTION, null, null);
xNamedTextSection.setName(ReportTextDocument.COPYOFRECORDSECTION);
renameTableofLastSection(ReportTextDocument.COPYOFTBLRECORDSECTION);
}
}