When running a report from Servoy with Jasper Reports it sometimes happens that a user gives a selection of parameters that will result into an empty report.
That is no problem. Jasper gives a pop-up message with ‘The document has no pages’.
But after clicking OK on that popup message, the Jasper Viewer is still coming up. There is no reason for that, because Jasper already saw that there are no pages.
How can I avoid that the viewer is shown when the document has no pages?
My coding is like this:
var _document = 'report.jrxml'
var param = new java.util.HashMap();
param.put('afdeling_vanaf', '');
param.put('afdeling_tm', 'ZZZZZZZZ');
plugins.jasperPluginRMI.jasperReport('server', _document, null,'viewer', param);
It happens on all reports, not just the above coding.
Anyone knows how to avoid that?
Martin