for (int i = crosstabLayout.getFirstColGroupIndex(), count = 0; i < gidx; i += 1, count += 1)
{
if (crosstabLayout.isGenerateColumnTitleHeaders())
{
final InstanceID columnTitleHeaderId = crosstabLayout.getColumnTitleHeaderCellId(i - crosstabLayout.getFirstColGroupIndex());
final RenderNode columnTitleHeaderCell = CrosstabOutputHelper.findNode(section, columnTitleHeaderId);
if (columnTitleHeaderCell instanceof TableCellRenderBox)
{
final TableCellRenderBox cellBox = (TableCellRenderBox) columnTitleHeaderCell;
cellBox.update(cellBox.getRowSpan(), cellBox.getColSpan() + 1);
}
else
{
throw new IllegalStateException("Unable to find node for previous column title header. Aborting report processing.");
}
}
final InstanceID columnHeaderId = crosstabLayout.getColumnHeaderCellId(i - crosstabLayout.getFirstColGroupIndex());
final RenderNode columnHeaderCell = CrosstabOutputHelper.findNode(section, columnHeaderId);
if (columnHeaderCell instanceof TableCellRenderBox)
{
final TableCellRenderBox cellBox = (TableCellRenderBox) columnHeaderCell;
cellBox.update(cellBox.getRowSpan(), cellBox.getColSpan() + 1);