Naming tabs in Export to Excel

micajblock
edited February 11, 2022 in Analytics #1
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.<br />
<br />
For hard coded value:
reportContext.setPageVariable( reportContext.PAGE_VAR_PAGE_LABEL, "Table" );
<br />
For value based on data (on the report item in group header):
reportContext.setPageVariable( reportContext.PAGE_VAR_PAGE_LABEL, this.getValue() );

Comments

  • Hi Mica ,

    will this work in eclipse BIRT version free version ?

  • I believe it should work. If it doesn't, it's my understanding that OS Birt also picks up the name of things like tables and grids (and possibly other elements).

    Warning No formatter is installed for the format ipb