dataFactory.open();
try
{
final TableModel reportData = queryReportData(parent.getQuery(), parent.getQueryTimeout(), dataFactory);
final DataSchema dataSchema = dataSchemaCompiler.compile
(reportData, expressions, parameterRow, parameterDefinitions, masterReport.getReportEnvironment());
this.columnNames = collectColumnNames(reportData, parameterRow, expressions);
if (reportData instanceof CloseableTableModel)
{
final CloseableTableModel ctm = (CloseableTableModel) reportData;
ctm.close();
}
return dataSchema;
}
finally
{
dataFactory.close();
}
}
catch (final ReportDataFactoryException rdfe)
{
final TableModel reportData = new DefaultTableModel();
final DataSchema dataSchema = dataSchemaCompiler.compile
(reportData, expressions, parameterRow, parameterDefinitions, masterReportElement.getReportEnvironment());
this.columnNames = collectColumnNames(reportData, parameterRow, expressions);
this.dataFactoryException = rdfe;
return dataSchema;
}
catch (ReportProcessingException e)
{
final TableModel reportData = new DefaultTableModel();
final DataSchema dataSchema = dataSchemaCompiler.compile
(reportData, expressions, parameterRow, parameterDefinitions, masterReportElement.getReportEnvironment());
this.columnNames = collectColumnNames(reportData, parameterRow, expressions);
this.dataFactoryException = e;
return dataSchema;
}