Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
Multi-line Table header
Migrateduser
Hi, can someone provide a code example as to how I can programmatically create a multi-line header section for a table in BIRT using the design API ?<br />
<br />
Currently, I can create a single row header as follows:<br />
<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>TableHandle table = elementFactory.newTableItem( "table", reportCols.size() );
table.setWidth( "100%" );
table.setProperty( IReportItemModel.DATA_SET_PROP, DATA_SET_NAME );
RowHandle tableheader = (RowHandle) table.getHeader().get(0);
StyleHandle labelStyle = StyleCreator.createStyle(elementFactory,"label",
DesignChoiceConstants.FONT_STYLE_NORMAL,
DesignChoiceConstants.FONT_WEIGHT_BOLD,
DesignChoiceConstants.FONT_FAMILY_SERIF,
DesignChoiceConstants.FONT_SIZE_XX_SMALL,
"#000000");</pre>
<br />
<br />
I tried to add new rows to teh table header using something like this:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>table.getHeader().add(elementFactory.newTableRow());
table.getHeader().add(elementFactory.newTableRow());</pre>
<br />
and then<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>RowHandle tableheader0 = (RowHandle) table.getHeader().get( 0 );
RowHandle tableheader1 = (RowHandle) table.getHeader().get( 1 );</pre>
<br />
but that didn't work. Any help would be greatly appreciated.
Find more posts tagged with
Comments
There are no comments yet