Custom Jaspersoft Studio Report: How to avoid having repeated headers in Reports and Jobs in Clarity

book

Article ID: 194696

calendar_today

Updated On:

Products

Clarity PPM On Premise

Issue/Introduction

We are running a custom Data dump / extract report with many records in immediate mode in Advanced Reporting. We cannot run it from Reports and jobs as when we do, we have issue with repeated headers on each page in Excel. The results are imported into another system so we cannot have this duplicate headers. Please advise.

Cause

The reason for the difference in behavior between Advanced Reporting and Reports and Jobs in Clarity: 

The headers are automatically suppressed in Advanced Reporting in $Jaspersoft\webapps\reportservice\WEB-INF\classes\jasperreports.properties

In Clarity - Reports and Jobs a API is used that does not go through this file. This is why you should configure your report in Jaspersoft Studio to avoid the difference in behavior on Excel export. 

Environment

Release : All supported Clarity releases

Component : CA PPM JASPERSOFT

Resolution

Open your report for editing in Studio.

1. If you are using a Group, you should not check the option Reprint Header On Each Page

 

2. If you do not use a Group, then you should use the Print When Expression option:

Use an expression such as below:

<printWhenExpression><![CDATA[$V{PAGE_NUMBER} <=1]]></printWhenExpression>

 

 

 

Once modified, save the report back to Jaspersoft and try again after reloading it to run it from Reports and Jobs in Clarity.

Additional Information

 Note: If you want the headers but you don't want the headers only when you are exporting, there is a property in Excel to remove the headers:

https://community.jaspersoft.com/wiki/how-can-i-suppress-page-headers-and-footers-when-exporting-xls

Attachments