- Add
net.sf.jasperreports.export.xls.remove.empty.space.between.columns
and net.sf.jasperreports.export.xls.remove.empty.space.between.rows
properties for the report.
net.sf.jasperreports.export.xls.remove.empty.space.between.columns
. Specifies whether to remove empty separator columns.
net.sf.jasperreports.export.xls.remove.empty.space.between.rows
. Indicates whether blank separator lines should be removed.
Sample:
<jasperReport ...> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <property name="net.sf.jasperreports.export.xls.remove.empty.space.between.columns" value="true"/> <property name="net.sf.jasperreports.export.xls.remove.empty.space.between.rows" value="true"/>
Information on configuration properties is here .
- You can set isRemoveLineWhenBlank and isBlankWhenNull for the textField element to hide the empty line.
Example of deleting the entire line if the current text field is empty:
<textField isBlankWhenNull="true"> <reportElement x="0" y="0" width="100" height="20" isRemoveLineWhenBlank="true"/> <textElement/> <textFieldExpression><![CDATA[$F{field}]]></textFieldExpression> </textField>
- Another suggestion is to change the height of all textField elements (or / and staticText) in the group.
In case this design:

you will have a space between any two lines.
In case this design (the height of the text field is equal to the height of the strip): 
each row will be exactly below the other.
source share