How to remove repeating table headers in the report that should be exported to CSV in Jaspersoft

book

Article ID: 208376

calendar_today

Updated On:

Products

Clarity PPM SaaS Clarity PPM On Premise

Issue/Introduction

Table Headers are repeating while exporting Adhoc Reports to CSV

Step to Reproduce 

  1. Create an adhoc report using domains 
  2. Run the report immediately or schedule  and export to csv 

Expected Result : If the report is more than 1 page the header should populate at the start of csv file 

Actual Results : The headers are repeated as soon in the CSV file 

 

Cause

Configuration issue with Jaspersoft and we have logged a defect DE59751 to add the configuration 

Environment

Release : 15.x with Jaspersoft 7.1.3 

Component : CA PPM SAAS JASPERSOFT

Resolution

Workaround: 

 

  • If you are SaaS customer you can use export to excel as the below configuration is not available at this point of time. We are planning to add this in future release of Jaspersoft 
  • If you are on Premise customer you can add the below in your jasperreports.properties file and restart Jaspersoft service.  
    • Open the configuration file, \jasperserver-pro\WEB-INF\classes\jasperreports.properties, in your favorite editor 

    • Add to the very end of the configuration file the lines that I quote below:

    • #suppress page and column footers and all but the first page and column headers when exporting to CSV
      net.sf.jasperreports.export.csv.exclude.origin.keep.first.band.1=pageHeader
      net.sf.jasperreports.export.csv.exclude.origin.band.2=pageFooter
      net.sf.jasperreports.export.csv.exclude.origin.keep.first.band.3=columnHeader
      net.sf.jasperreports.export.csv.exclude.origin.keep.first.report.3=*
      net.sf.jasperreports.export.csv.exclude.origin.band.4=columnFooter