Blank PDF even with the simplest Jasperreport jrxml

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 whenNoDataType attribute) would be to print all report sections, excepting the <detail>.

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.

Source: https://community.jaspersoft.com/questions/537650/blank-pdf-even-simplest-jrxml

Leave a Comment