ArrayList selectedTopFields = new ArrayList();
ReportVO reportVO = getStandardReport(userId, reportId);
ReportContentLocalHome reportContentHome = EntityHomeFactory.getReportContentLocalHome();
ReportContentLocal reportContent = null;
Collection reportContents = reportContentHome.findByReport(reportId, this.dataSource);
for (Iterator iterator = reportContents.iterator(); iterator.hasNext();) {
reportContent = (ReportContentLocal) iterator.next();
tableId = reportContent.getTableId();
fieldId = reportContent.getFieldId();
fieldName = getFieldName(fieldId, tableId);
selectedTopFields.add(new ReportContentVO(fieldId, tableId, fieldName, reportContent.getSortOrderSequence(), reportContent.getSortOrder()));
}
reportVO.setSelectedFields(selectedTopFields);
return reportVO;
} catch (Exception e) {
throw new EJBException(e);