Object[] OldGroupFieldValues = new Object[GroupFieldCount];
XTextTable[] xGroupBaseTables = new XTextTable[GroupFieldCount];
int RecordFieldCount = FieldCount - GroupFieldCount;
XTextDocument xTextDocument = CurReportDocument.xTextDocument;
XTextCursor xTextCursor = ReportDocument.createTextCursor(CurReportDocument.xTextDocument.getText());
xTextDocument.lockControllers();
if (CurDBMetaData.ResultSet.next() == true) {
replaceUserFields();
Helper.setUnoPropertyValue(xTextCursor, "PageDescName", "First Page");
for (ColIndex = 0; ColIndex < GroupFieldCount; ColIndex++) {
CurGroupTableName = TBLGROUPSECTION + Integer.toString(ColIndex + 1);