Jump to content
We've recently updated our Privacy Statement, available here ×

Prevent Column Header to repeat itself every "page" when export to Xlsx


gustavofarias
Go to solution Solved by gustavofarias,

Recommended Posts

When I design the report in JasperSoft Studio, in the preview, the column header is repeated for every page, which is ok. If I change the format to XLSx, the same occurs, which is not ok.

When I deploy the report to JasperReports Server, the vizualization has repeated column header, which is ok, but when I export to XLSX, the file correctly has no repeated column headers.

If I user URL access to generate the report in JasperReportsServer, like this:

...flow.html?_flowId=viewReportFlow&reportUnit=/someReport&j_username=anonymousUser&j_password=&output=xlsx
The report has repeated columns headers, which is not ok.

So, what should I do to export to XLSX whithout repeating column headers? What JasperReports Server gui do to prevent this?

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Have you already tried to set the XLS Export property at (main) jrxml-report ?

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

(just change it to xlsx for the newer Excel exporter)

Also the jasper-wiki has some nice articles concerning preparing "clean" Excel sheets... e.g. https://community.jaspersoft.com/wiki/xls-export-parameters-jasperreports-server#XLS_Export_Parameters

hth + regards

C-Box

Link to comment
Share on other sites

By setting "net.sf.jasperreports.export.xls.exclude.origin.band.1", the column header vanished even from first page in xls format.

Another solution is to put "print when" = PAGE == 1. But this prevents the header to show in other types of exports where it would be useful on every page. In fact it's easyer to put the headers in the Title band.

Anyway, thank you sir, I didn't know about the dozens of Advanced -> Misc -> Edit Properties. There are a lot of interesting properties very useful to excel exporting.

Link to comment
Share on other sites

Well I think you coud try to set this property also, to keep just the FIRST columnHeader but remove all FOLLOWING ones:

<property name="net.sf.jasperreports.export.xls.exclude.origin.keep.first.band.1" value="columnHeader"/>[/code]

hth + regards again

C-Box

Link to comment
Share on other sites

  • 4 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...