if (group.isPrintSummary() == false)
{
return;
}
final CrosstabCellBody dataBody = event.getReport().getCrosstabCellBody();
final CrosstabCell element = dataBody.findElement(null, group.getField());
if (element == null)
{
return;
}
// handle column summary. This can happen inline, with no new states fired.
final RenderedCrosstabLayout crosstabLayout = outputFunction.getCurrentRenderedCrosstabLayout();
final LayoutModelBuilder layoutModelBuilder = outputFunction.getRenderer().getNormalFlowLayoutModelBuilder();
if (crosstabLayout.isCrosstabHeaderOpen())
{
// Expand all parent group cell-spans by one.
expandColumnHeaderSpan(crosstabLayout, layoutModelBuilder, gidx);
// and finally print the title-header and the summary header
if (crosstabLayout.isGenerateColumnTitleHeaders())
{
layoutModelBuilder.startSubFlow(crosstabLayout.getColumnTitleHeaderSubflowId(gidx));
createAutomaticCell(layoutModelBuilder);
crosstabLayout.setColumnTitleHeaderCellId(gidx - crosstabLayout.getFirstColGroupIndex(), layoutModelBuilder.dangerousRawAccess().getInstanceId());
outputFunction.getRenderer().add(group.getTitleHeader(), outputFunction.getRuntime());
layoutModelBuilder.finishBox();
layoutModelBuilder.suspendSubFlow();
}
layoutModelBuilder.startSubFlow(crosstabLayout.getColumnHeaderSubflowId(gidx));
createAutomaticCell(layoutModelBuilder);
crosstabLayout.setColumnHeaderCellId(gidx - crosstabLayout.getFirstColGroupIndex(), layoutModelBuilder.dangerousRawAccess().getInstanceId());
outputFunction.getRenderer().add(group.getSummaryHeader(), outputFunction.getRuntime());
layoutModelBuilder.finishBox();
layoutModelBuilder.suspendSubFlow();
if (crosstabLayout.isGenerateMeasureHeaders())
{
layoutModelBuilder.startSubFlow(crosstabLayout.getMeasureHeaderSubflowId());
createAutomaticCell(layoutModelBuilder);
outputFunction.getRenderer().add(dataBody.getHeader(), outputFunction.getRuntime());
layoutModelBuilder.finishBox();
layoutModelBuilder.suspendSubFlow();
}
}