try
{
final FlowExcelOutputProcessor outputProcessor =
new FlowExcelOutputProcessor(configuration, outputStream, masterReport.getResourceManager());
outputProcessor.setUseXlsxFormat(false);
final FlowReportProcessor streamReportProcessor =
new FlowReportProcessor(masterReport, outputProcessor);
try
{
final ReportProgressListener[] progressListeners = getReportProgressListeners();
for (int i = 0; i < progressListeners.length; i++)
{
final ReportProgressListener listener = progressListeners[i];
streamReportProcessor.addReportProgressListener(listener);
}
streamReportProcessor.processReport();
}
finally
{
streamReportProcessor.close();
}
}
finally
{
outputStream.close();