JRXmlWriter.writeReport(jr, filename, xmlEncoding);
}
protected static void compileOrLoadSubreports(DynamicReport dr, Map _parameters) throws JRException {
for (Iterator iterator = dr.getColumnsGroups().iterator(); iterator.hasNext();) {
DJGroup group = (DJGroup) iterator.next();
//Header Subreports
for (Iterator iterator2 = group.getHeaderSubreports().iterator(); iterator2.hasNext();) {
Subreport subreport = (Subreport) iterator2.next();
if (subreport.getDynamicReport() != null){
compileOrLoadSubreports(subreport.getDynamicReport(),_parameters);
JasperReport jp = generateJasperReport(subreport.getDynamicReport(), subreport.getLayoutManager(), _parameters);
_parameters.put(jp.toString(), jp);
subreport.setReport(jp);
}
}
//Footer Subreports
for (Iterator iterator2 = group.getFooterSubreports().iterator(); iterator2.hasNext();) {
Subreport subreport = (Subreport) iterator2.next();
if (subreport.getDynamicReport() != null){
compileOrLoadSubreports(subreport.getDynamicReport(),_parameters);
JasperReport jp = generateJasperReport(subreport.getDynamicReport(), subreport.getLayoutManager(), _parameters);