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
How to define group property using BIRT design Engine API
Migrateduser
Hi,
I can define the row header and cell property using below code, but how can i define the group property. Please suggest.
// table header
RowHandle tableheader = (RowHandle) table.getHeader( ).get( 0 );
for( int i=0; i < cols.size(); i++){
LabelHandle label1 = designFactory.newLabel( (String)cols.get(i) );
label1.setText((String)cols.get(i));
CellHandle cell = (CellHandle) tableheader.getCells( ).get( i );
cell.getContent( ).add( label1 );
StyleHandle styleHandle = cell.getPrivateStyle();
styleHandle.setProperty(StyleHandle.BACKGROUND_COLOR_PROP, "red");
styleHandle.setProperty(StyleHandle.FONT_FAMILY_PROP, "Arial");
styleHandle.setProperty(StyleHandle.FONT_SIZE_PROP, 14);
}
// table detail
RowHandle tabledetail = (RowHandle) table.getDetail( ).get( 0 );
for( int i=0; i < cols.size(); i++){
CellHandle cell = (CellHandle) tabledetail.getCells( ).get( i );
DataItemHandle data = designFactory.newDataItem( "data_"+(String)cols.get(i) );
data.setResultSetColumn( (String)cols.get(i));
cell.getContent( ).add( data );
StyleHandle styleHandle = cell.getPrivateStyle();
ColorHandle colorHandle = styleHandle.getBackgroundColor();
colorHandle.setRGB(0xFF8888);
}
Find more posts tagged with
Comments
There are no comments yet