I\'m writing a pretty simple sample project for familiarizing myself with Jasper Reports. I\'d like to export a report I\'ve configured to a PDF OutputStream, b
You can use a JRExporter to export the filled report to different streams and formats.
JRExporter exporter = null;
exporter = new JRPdfExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, outputStream);
exporter.exportReport();
Also note that there are other exporters:
exporter = new JRRtfExporter();
exporter = new JRHtmlExporter();
You can find more exporters available here: http://jasperreports.sourceforge.net/api/net/sf/jasperreports/engine/JRExporter.html
They should all accept an OUTPUT_STREAM parameter to control the destination of the report.