I need to export a report and save it to a location specified, i have exported the report but i want to know how to save it in a file location, it is a doc or rtf format
A:
Use
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, filename);
exporter.exportReport();
of your conrete JRExporter
. jasperPrint
is of course your JasperPrint
, and filename
is the name of the target file (including directory)
Bozho
2009-12-03 15:09:51
Thank You for the answer, but it doesnt work, This is my codeexporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, "F://sample.rtf");
stanley
2009-12-04 03:02:14
is there any exception? or how exactly it doesn't work.
Bozho
2009-12-04 06:54:07
I have fixed the problem, now it exports and saves in doc, Thank you
stanley
2009-12-04 07:14:02
Since Jasper uses JRRTFExporter for saving doc files, Is there any way to convert rtf to doc , or must we set any headers to convert it in doc in jasper?
stanley
2009-12-04 07:16:27
ask that as another question. (I don't know)
Bozho
2009-12-04 07:38:37