jasperreport: how to export into rtf file?

F

ffellico

HI!

I am referring to the code suggested in:

http://developers.sun.com/prodtech/.../reference/techart/jse8/jasper_reports.html#2


This is the code:

String reportSource = "./report/templates/HelloReportWorld.jrxml";
String reportDest = "./report/results/HelloReportWorld.html";

Map<String, Object> params = new HashMap<String, Object>();

try
{
JasperReport jasperReport =
JasperCompileManager.compileReport(reportSource);

JasperPrint jasperPrint =
JasperFillManager.fillReport(
jasperReport, params, new JREmptyDataSource());

JasperExportManager.exportReportToHtmlFile(
jasperPrint, reportDest);

JasperViewer.viewReport(jasperPrint);
}

catch (JRException ex)
{
ex.printStackTrace();
}


It work well and I have easily changed it exporting in a PDF file only
substituting "exportReportToHtmlFile" with "exportReportToPdfFile";
unfortunately the JasperExportManager do not have a
"exportReportToRtfFile" and I think that in that case it's necessary
to use in such a way JRRtfExporter and I am unable tu do that.

So, can anyone write me a snipped of code to export instead in a RTF
file?

Thank you in advance,. Franco from Italy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top