debug( "ResultSet is not scrollable. Copying into memory" ); //$NON-NLS-1$
IPentahoResultSet memSet = resultset.memoryCopy();
resultset.close();
resultset = memSet;
}
factory.addTable( AbstractJFreeReportComponent.DATACOMPONENT_DEFAULTINPUT, new PentahoTableModel( resultset ) );
} else if ( dataObject instanceof TableModel ) {
factory.addTable( AbstractJFreeReportComponent.DATACOMPONENT_DEFAULTINPUT, (TableModel) dataObject );
}
IActionInput[] subreportQueries = jFreeReportAction.getSubreportQueryParams();
for ( IActionInput element : subreportQueries ) {
dataObject = element.getValue();
if ( dataObject instanceof IPreparedComponent ) {
factory.addPreparedComponent( element.getName(), (IPreparedComponent) dataObject );
} else if ( dataObject instanceof IPentahoResultSet ) {
final IPentahoResultSet resultset = (IPentahoResultSet) dataObject;
resultset.beforeFirst();
factory.addTable( element.getName(), new PentahoTableModel( resultset ) );
} else if ( dataObject instanceof TableModel ) {
factory.addTable( element.getName(), (TableModel) dataObject );
}
}
}