Remove spaces when exporting

0

Hi,

I want a single page report in xls and csv,so I removed extra headers.But the problem is when exporting always spaces are being created in which column headers was there.I've added

<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"/>

these properties but the result is same.So my report seems like that in libreoffice calc.Any ideas?

gurpinars's picture
Joined: Sep 10 2015 - 3:53am
Last seen: 1 year 7 months ago

How do you want it to display? Difficult to know where the extra columns and rows are from just looking at two rows you've provided.

hozawa - 4 years 1 month ago

150th is extra row and at 149th row 8th column there is a overflow.Why? My all properties:

<property name="com.jaspersoft.studio.unit." value="pixel"/> <property name="com.jaspersoft.studio.unit.pageHeight" value="pixel"/> <property name="com.jaspersoft.studio.unit.pageWidth" value="pixel"/> <property name="com.jaspersoft.studio.unit.topMargin" value="pixel"/> <property name="com.jaspersoft.studio.unit.bottomMargin" value="pixel"/> <property name="com.jaspersoft.studio.unit.leftMargin" value="pixel"/> <property name="com.jaspersoft.studio.unit.rightMargin" value="pixel"/> <property name="com.jaspersoft.studio.unit.columnWidth" value="pixel"/> <property name="com.jaspersoft.studio.unit.columnSpacing" value="pixel"/> <property name="net.sf.jasperreports.print.keep.full.text" value="true"/> <property name="net.sf.jasperreports.export.xls.detect.cell.type" value="true"/> <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"/> <property name="net.sf.jasperreports.export.xls.collapse.row.span" value="true"/> <property name="net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.1" value="pageHeader"/> <property name="net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.2" value="columnHeader"/> <property name="net.sf.jasperreports.export.xls.exclude.origin.band.3" value="pageFooter"/> <property name="net.sf.jasperreports.export.xls.one.page.per.sheet" value="false"/> <property name="net.sf.jasperreports.export.csv.exclude.origin.keep.first.band.3" value="columnHeader"/> <property name="net.sf.jasperreports.export.csv.exclude.origin.band.2" value="pageFooter"/>

gurpinars - 4 years 1 month ago

2 Answers:

-1

If you don't have a page header, just delete it. I just added the property below and the excel came out just fine without any extra row.

<property name="net.sf.jasperreports.export.xls.exclude.origin.band.1" value="columnHeader"/>

hozawa's picture
50973
Joined: Apr 24 2010 - 4:31pm
Last seen: 4 months 1 week ago
0

Juust Set the detail band property "Split Type" to "Prevent". OR edit the JRXML as thus:

<detail>

<band height="27" splitType="Prevent">

</detail>
icemann's picture
Joined: Jul 3 2014 - 6:13am
Last seen: 2 years 2 months ago
Feedback
randomness