Total Pageviews

2011/12/22

No output specified for the exporter

Problem
As I would like to export pdf via JasperReports JRExporter, it throw "No output specified for the exporter" exception.

Root Cause
I forgot to set OutputStream to JRExporter parameter, i.e.
1:  JRExporter pdfExporter = new JRPdfExporter();  
2:  pdfExporter.setParameter(JRExporterParameter.OUTPUT_STREAM, outputStream);  
3:  //........  

No comments: