I am using Jasper Studio 6.6.0 and Jasper server 7.1.
I have created a simple report with an image from a specified URL.
It generates correctly in Jasper Studio, but in the server it shows empty.
Please refer images attached:
Server Screenshot Jasper Screenshot
The best way to do not have the empty page when no data source is provided, is to trick jasper to think there is a data source:
1) Define an Data Adapter (a simple .xml file) and put it in reports folder:
2) Link it into the main report:
prefix "repo:" to the value of the property for the data adapter, if the xml is deployed on jasper server.
The attribute "whenNoDataType" will be ignored.
Other details here.
If you want to show something in the JasperReport without data source or with empty data source then you have two options:
1) Set the When No Data Type property on All Section No Detail option in the Jasper Studio:
In JRXML it can be done by setting
whenNoDataType="AllSectionsNoDetail"
attribute on the root<jasperReport>
element.2) Or you can move content you want to show when there is no data into No Data band of the report:
In JRXML it it can be done by adding of this:
JasperReport renders blank page when there are no data as a default and JasperServer shows The report is empty, so select from above options one you prefer to be able to show the image you want.