DEV Community

jgngo
jgngo

Posted on

Jasper Studio Design Tips

If you are designing a columnar report intended to be exported as Excel, here are some tips.

Design

Move the column titles to the Title band. This will allow it to appear only once in the report and not in every page.

Retain only the Title and Detail bands. Delete all other bands.

In the Title band, have only the report title and the column header in two rows. There is a property below that tells Excel to freeze the top 2 rows so that the title row and the column headers row is frozen so the user can scroll through thousands of records and still see them.

In the Detail band properties, set the following:

  • Layout: "Grid" or "Spreadsheet". This forces the columns to be right beside each other.
  • Height: 14 px

Properties for Excel Export

In the Source tab, insert the following lines below the other properties. These are selected properties recommended by this article.

<property name="net.sf.jasperreports.export.xls.wrap.text" value="false"/>
<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.rows" value="true"/>
<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.columns" value="true"/>
<property name="net.sf.jasperreports.export.xls.white.page.background" value="false"/>
<property name="net.sf.jasperreports.export.xls.detect.cell.type" value="true"/>
<property name="net.sf.jasperreports.export.xls.ignore.graphics" value="false"/>
<property name="net.sf.jasperreports.page.break.no.pagination" value="apply"/>
<property name="net.sf.jasperreports.export.xls.freeze.row" value="3"/>
<property name="net.sf.jasperreports.print.keep.full.text" value="true"/>
Enter fullscreen mode Exit fullscreen mode

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay