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


When you are not using the details band, just static values, you can do the following:

Right click in the iReport project, then select 'Properties', search for the property 'When no Data', and select 'All Sections, No Detail'

It works for me, using iReport 4.0