Why Jasper Reports shows empty report in server, but generates correctly in jasper studio

前端 未结 2 1244
时光说笑
时光说笑 2021-01-24 15:16

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,

2条回答
  •  花落未央
    2021-01-24 15:43

    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 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.

提交回复
热议问题