Preparing your Report before Exporting
This article covers the necessary settings required in order to utilize the improved Excel export options in Jaspersoft Studio 6.20.3.
One of the first steps is to setup a data source in Jaspersoft Studio to go against the CSV data source if one is being used. The process to do this is very similar to setting up a connection against any other data source. Below are a couple of screenshots that show this process:
Once the report is developed and the layout is in place a few settings need to be enabled in the designer to enable the export to Excel and make use of the improved Excel export options. Specifically the improvements provide the ability to group and ungroup data cells within Excel and the ability to maintain row or column headings while scrolling through an Excel sheet.
For the group and ungroup settings the setting that needs to be set is the net.sf.jasperreports.export.xls.outline.level prefix followed by a suffix representing the outline level. This is set through the expression editor in Jaspersoft Studio or by editing the XML file for the particular report.
More information is available on the following page:
http://jasperreports.sourceforge.net/sample.reference/xlsfeatures/index.html#xlsfeatures
The necessary settings to ensure the report uses the export capabilities are set under the Windows-> Preferences menu within Jaspersoft Studio. In this window under Jaspersoft Studio select the tab called "Export options" and select the Excel option. Under the Common tab the following changes should be made:
- Check the Detect Cell Type option (Cell tab)
- Freeze pane on row (Common tab) - In the example report being exported the need is to maintain the column heading while scrolling through rows- we input 3 here which is the row for the column heading.
The export output of the report once exported to Excel is shown below
Recommended Comments
There are no comments to display.
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 accountSign in
Already have an account? Sign in here.
Sign In Now