public ProcessState commit(final ProcessState next) throws ReportProcessingException { next.setInItemGroup(true); // fast forward to the end of the facts .. while (true) { final DefaultFlowController fc = next.getFlowController().performAdvance(); final Group group = next.getReport().getGroup(next.getCurrentGroupIndex()); final DefaultFlowController cfc = fc.performCommit(); if (ProcessState.isLastItemInGroup(group, fc.getMasterRow(), cfc.getMasterRow())) { next.setFlowController(fc); next.setAdvanceHandler(PrintSummaryEndCrosstabColumnAxisHandler.HANDLER); break; } else { next.setFlowController(cfc); next.setAdvanceHandler(PrintSummaryProcessCrosstabFactHandler.HANDLER); } } next.setInItemGroup(false); return next; }