Rich Text Format (RTF) is a document file format that is supported by most word processors. Exporting to RTF allows our documents to be read by Microsoft Word and several other word processors.
In the following example, we will export a report to RTF format.
package net.ensode.jasperbook; import java.io.File; import net.sf.jasperreports.engine.JRException; import net.sf.jasperreports.engine.JRExporterParameter; import net.sf.jasperreports.engine.JasperPrint; import net.sf.jasperreports.engine.export.JRRtfExporter; import net.sf.jasperreports.engine.util.JRLoader; public class RtfExportDemo { public static final String REPORT_DIRECTORY = "reports"; public void rtfExport(String reportName) { File file = new File(REPORT_DIRECTORY + "/" + reportName + "...