Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Document has no pages" on iReport and nothing on OpenReports

I am having an issue with JasperReports I can not solve. I am using Eclipse, OpenReports 3.2 and IReport 3.7

The issue I am having is that the report does nothing. When I preview the report in IReport I can at least get a "Document has no pages" message but when I try to open it using OpenReports it doesn't do anything. I get the open reports header and the copyright message but nothing between them.

I was able to track it down to line 150 in ReportRunAction.java in OpenReports. That line is:

jasperPrint = jasperEngine.fillReport(reportInput);

At least that is the line the page dies on. It trips the catch block that the line is inside of but the error is empty. When I try to print the description it is null. I can't swear that the issue isn't that parameter. Through looking around all I have been able to find is something about how the report needs to be compiled with the same version of the jasperreports.jar that OpenReports uses. I have no idea how to tell if/what version of jasper reports is being bundled into the .jasper file though.

Is that my problem? If so how do I tell/set the version of the jar that gets bundled? If not; help!

like image 938
William Avatar asked Feb 27 '23 02:02

William


1 Answers

The no pages messages comes out when the report has not records or you discarded all of them with a wrong filter expression.

There are a couple of things you can try:

  1. set the filter expression to:

    new Boolean (true)

This will in some way reset your filter expression.

  • Right click your jasper report

  • properties

  • find more...

    and Set the report property "When no data" to "All sections no details" so you can see at least the rest of the report.

Thanks.

like image 150
Muhammad Siddique Avatar answered Apr 25 '23 15:04

Muhammad Siddique