iReport (JasperReports) extra row issue

后端 未结 2 1983
野趣味
野趣味 2021-01-14 00:37

I am getting an extra empty row between data when I am importing it from the database and formatting the report in Excel sheet.

EDIT (clarification

2条回答
  •  -上瘾入骨i
    2021-01-14 00:57

    • Add net.sf.jasperreports.export.xls.remove.empty.space.between.columns and net.sf.jasperreports.export.xls.remove.empty.space.between.rows properties to report template.

    net.sf.jasperreports.export.xls.remove.empty.space.between.columns - Specifies whether the empty spacer columns should be removed or not.

    net.sf.jasperreports.export.xls.remove.empty.space.between.rows - Specifies whether the empty spacer rows should be removed or not.

    The sample:

    
        
        
        
        
        
    

    The information about configuration properties is here.

    • You can set isRemoveLineWhenBlank and isBlankWhenNull for textField element for hiding blank row.

    The sample how to remove the whole line if the current textField is empty:

    
        
        
        
    
    
    • Another assumption is to change the height of all textField (or/and staticText) elements in the Band.

    In case this design:

    design with a space between textField and the band's boundary

    you will have a space between any two rows.

    In case this design (textField height is equal to the Band's height): the textfield height is equal to the band's height

    the each line will be exactly under the other.

提交回复
热议问题