Jump to content

BIRT Developer Center Download


Submitter

File Information

  • Submitted: Jul 10 2013 08:27 PM
  • Last Updated: Apr 22 2014 10:44 AM
  • File Size: 5.07KB
  • Views: 18097
  • Downloads: 146
  • Approved by: kclark
  • Approved on: 22 April 2014 - 10:45 AM
  • Summary: The code example uses a simple script to name the tabs when exporting the report to Excel
  • Content Type: Designs & Code
  • BIRT Version: Actuate 11

Download Naming tabs in Export to Excel

* * * * * 1 Votes
Rename Tabs Excel



Screenshots
First, thanks to Trevor Huston for pointing the way. In the attached zip file are two examples. One uses hard coded value to name the tabs, while the other uses values from the database. Both examples use Classic Models sample database. This is only for the commercial version of the Excel emitter. To test run the reports and export to XLS or XLSX. Make you check the box 'Output to multiple sheets'. The code is simple and is on the 'onPageBreak' event.

For hard coded value:
reportContext.setPageVariable( reportContext.PAGE_VAR_PAGE_LABEL, "Table" );
For value based on data (on the report item in group header):
reportContext.setPageVariable( reportContext.PAGE_VAR_PAGE_LABEL, this.getValue() );







0 user(s) are online (in the past 1 minutes)

0 members, 0 guests, 0 anonymous users