Jaspersoft CABI export report in CSV without additional page headers
search cancel

Jaspersoft CABI export report in CSV without additional page headers

book

Article ID: 280203

calendar_today

Updated On:

Products

Spectrum

Issue/Introduction

We have the need to export reports in CABI in CSV format, but when we do, we notice that it prints out the page and header information, instead of continuous data.

How can we change this so that the page and header are only shown once in the very beginning of the export?

Environment

Jaspersoft 7.9.2.x

Spectrum 22.x / 23.x

Cause

Default setting for CSV is to include the page header information for each page.

Resolution

1. On the Jaspersoft / CABI server cd into this location

cd /opt/CA/SharedComponents/CABI/apache-tomcat/webapps/jasperserver-pro/WEB-INF/classes/

 

Note; The path may vary slightly depending upon how you installed CABI

 

2. Make a backup of the file jasperreports.properties

 

3. Edit the file jasperreports.properties and near the bottom you should see the following paragraph.

 

net.sf.jasperreports.print.transfer.jrs.export=com.jaspersoft.jrs.export
#com.jaspersoft.jrs.export.csv.paginated=true
#com.jaspersoft.jrs.export.xls.paginated=true
#com.jaspersoft.jrs.export.pdf.paginated=false
#com.jaspersoft.jrs.export.pdf.max.page.height=14400
#com.jaspersoft.jrs.export.pdf.max.page.width=14400
#com.jaspersoft.jrs.export.docx.paginated=false
#com.jaspersoft.jrs.export.rtf.paginated=false
#com.jaspersoft.jrs.export.odt.paginated=false

 

Uncomment the 2nd line and change to false so that it looks like this

net.sf.jasperreports.print.transfer.jrs.export=com.jaspersoft.jrs.export
com.jaspersoft.jrs.export.csv.paginated=false
#com.jaspersoft.jrs.export.xls.paginated=true
#com.jaspersoft.jrs.export.pdf.paginated=false
#com.jaspersoft.jrs.export.pdf.max.page.height=14400
#com.jaspersoft.jrs.export.pdf.max.page.width=14400
#com.jaspersoft.jrs.export.docx.paginated=false
#com.jaspersoft.jrs.export.rtf.paginated=false
#com.jaspersoft.jrs.export.odt.paginated=false

 

4, Run ./stopServer.sh and ./startServers.sh from /opt/CA/SharedComponents/CABI

 

5. Now when you select the report in CSV, it will export without additional page header information.