public static void performLayout(final Band band,
final ExpressionRuntime runtime,
final OutputProcessor outputTarget)
throws ReportProcessingException, ContentProcessingException
{
StreamingRenderer renderer = new StreamingRenderer(outputTarget);
renderer.startReport(band.getReportDefinition(), runtime.getProcessingContext(), new DefaultPerformanceMonitorContext());
renderer.startSection(Renderer.SectionType.NORMALFLOW);
renderer.add(band, runtime);
renderer.endSection();
renderer.endReport();
renderer.applyAutoCommit();
if (renderer.validatePages() == Renderer.LayoutResult.LAYOUT_UNVALIDATABLE)
{
throw new ReportProcessingException("Template layout is not valid, aborting");
}
renderer.processPage(null, null, true);
}