UncaughtExceptionsModel.getInstance().addException(e);
}
// Prompt user to either create or use an existing data-source.
final SubReportDataSourceDialog crosstabDataSourceDialog;
if (window instanceof Dialog)
{
crosstabDataSourceDialog = new SubReportDataSourceDialog((Dialog) window);
}
else if (window instanceof Frame)
{
crosstabDataSourceDialog = new SubReportDataSourceDialog((Frame) window);
}
else
{
crosstabDataSourceDialog = new SubReportDataSourceDialog();
}
// User has prompted to select a data-source. Get the selected query
final String queryName = crosstabDataSourceDialog.performSelection(designerContext);
if (queryName != null)
{
subReport.setQuery(queryName);
// Invoke Crosstab dialog