}
ItemSelectorEditable<QueryExecuterSub> subreports = reportQuery.getSubReports();
QueryExecuterSub subreport = subreports.get(subreportTable.getSelectedRow());
try {
Report report = queryManager.get(subreport.getReportId());
Object res = report.execute();
ReportExecuteDialog dlg = new ReportExecuteDialog(parent);
while (res instanceof UserInputChunk) {
UserInputChunk chunk = (UserInputChunk) res;
dlg.addPanel(new UserInputPanel(chunk));
dlg.setVisible(true);
if (dlg.isOK()) {
throw new ReportException("Генерация отчета отменена");
}
res = report.continueReport(chunk);
}
QueryResults results = (QueryResults) res;
UserChoiceDlg userChoiceDlg = new UserChoiceDlg(parent, results,
subreport.getActiveRows(),
subreport.getReport().getQuery().getColumns().getList());