i have a EJB site with glassfish 3.1 + JSF for jasperreport 4.0.1. the site has no problem on streaming pdf, but it products blank PDF while printing PDF with runReportToPd
After all, JasperRunManager.runReportToPdfStream(reportStream, servletOutputStream, parameterMap, new JREmptyDataSource()); solved the problem.
Quote from Sanda of Jasperreport:
By default, when no datasource info is present in a report, JR generates no pages. Another option (which can be set in the report's
whenNoDataTypeattribute) would be to print all report sections, excepting the.This report contains a detail section, but only with some static data. To ensure this section will be printed too, the simplest way is to provide an empty data source, containing a single empty record.