HOW-TO export to jrxml

Since DJ 2.0.4, JasperReports writing JRXML feature is enabled and can be used for later design retouching (in iReport maybe)

Once you have your design ready, use any of these:

 String xmlData =       DynamicJasperHelper.generateJRXML(dr, new ClassicLayoutManager(), parameters, "UTF-8");

or

 DynamicJasperHelper.generateJRXML(dr, new ClassicLayoutManager() , parameters, "UTF-8", outputStream);

or

 DynamicJasperHelper.generateJRXML(dr, new ClassicLayoutManager() , parameters, "UTF-8", destinationFilePath);

NOTE: Some exported designs that will fail when loading later because they may need some objects to be present in the parameters map.

Fork me on GitHub