* single threaded environments.
*/
public void execute()
throws ReportExecutionException, IOException
{
final DefaultReportJob job = new DefaultReportJob(report);
setMetaDataProperties(job);
final String contentType = (String) jobProperties.getProperty(ReportEngineParameterNames.CONTENT_TYPE);
//noinspection OverlyBroadCatchBlock
try
{
final ReportParameters parameters = job.getParameters();
if (masterValues != null && detailColumns != null)
{
parameters.put(SDBCReportDataFactory.MASTER_VALUES, masterValues);
parameters.put(SDBCReportDataFactory.DETAIL_COLUMNS, detailColumns);
}
final Node[] nodes = report.getNodeArray();
final FormulaParser parser = new FormulaParser();
final ArrayList expressions = new ArrayList();
final OfficeReport officeReport = (OfficeReport) ((Section) nodes[0]).getNode(0);
final Section reportBody = (Section) officeReport.getBodySection();
collectGroupExpressions(reportBody.getNodeArray(), expressions, parser, officeReport.getExpressions());
parameters.put(SDBCReportDataFactory.GROUP_EXPRESSIONS, expressions);
final String command = (String) officeReport.getAttribute(OfficeNamespaces.OOREPORT_NS, "command");
final String commandType = (String) officeReport.getAttribute(OfficeNamespaces.OOREPORT_NS, SDBCReportDataFactory.COMMAND_TYPE);
final String escapeProcessing = (String) officeReport.getAttribute(OfficeNamespaces.OOREPORT_NS, SDBCReportDataFactory.ESCAPE_PROCESSING);
report.setQuery(command);
parameters.put(SDBCReportDataFactory.COMMAND_TYPE, commandType);
parameters.put(SDBCReportDataFactory.ESCAPE_PROCESSING,Boolean.valueOf(!("false".equals(escapeProcessing))));
final String filter = (String) officeReport.getAttribute(OfficeNamespaces.OOREPORT_NS, "filter");
parameters.put(SDBCReportDataFactory.UNO_FILTER, filter);
parameters.put(ReportEngineParameterNames.MAXROWS, report.getJobProperties().getProperty(ReportEngineParameterNames.MAXROWS));
final long startTime = System.currentTimeMillis();
final ReportProcessor rp = getProcessorForContentType(contentType);
rp.processReport(job);
job.close();
final long endTime = System.currentTimeMillis();
LOGGER.debug("Report processing time: " + (endTime - startTime));
}
catch (final Exception e)
{