Search code examples
jasper-reports

How to change the message "The Report is empty"


I use JasperSoft 6.0.3. If the sql query results no data then the report shows a message saying "The report is empty". I want to change that message to "First go to the Report1". How can I do that?

I know about the "WhenNoDataType" property. I want to set it as "No Pages" or "NULL" and change the message.

Thank you!


Solution

  • You can set whenNoDataType (When No Data property in iReport) report's attribute for showing "empty" report --> whenNoDataType="NoDataSection"

    The generated document will contain only a single noData section (band)

    In case using noData section you should add this band to the report's template