} else if ("CSV".equals(an.value())) {
CSVReportUtil.createCSV(mr, output, "UTF-8");
} else if ("XML".equals(an.value())) {
XmlTableReportUtil.createStreamXML(mr, output);
} else {
throw new ReportException("Unknown output format: " + an);
}
} catch (ReportProcessingException ex) {
throw new ReportException("Error rendering report", ex);
} catch (IOException io) {
throw new ReportException("Error rendering report", io);
}
}