[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.birt] Report Design: Changing CellHandle Color Property Dynamically
|
- From: shellie.wedman@xxxxxxxxx (shellie )
- Date: Mon, 3 Nov 2008 19:44:28 +0000 (UTC)
- Newsgroups: eclipse.birt
- Organization: Eclipse
- User-agent: NewsPortal/0.36 (http://florian-amrhein.de/newsportal)
I'm creating a report with a XML datasource. The XML has <value> and
<valuecolor> elements. I'm trying to dynamically set the "value" elements
cell color to the value of the dataSetRow[\"valuecolor\]". I'm not having
much luck. Each row is being printed out, but I don't know the syntax to
add the dynamic color instead of the hard-coded "red" value.
Any ideas? Thanks
cs3 = StructureFactory.createComputedColumn( );
cs3.setName("Node");
cs3.setExpression("dataSetRow[\"value\"]");//$NON-NLS-1$
computedSet.addItem( cs3 );
RowHandle detail3 = (RowHandle) table.getDetail( ).get( 0 );
tcell = (CellHandle) detail3.getCells( ).get( 2 );
tcell.setStringProperty("color", "red");
DataItemHandle data3 = elementFactory.newDataItem( null );
data3.setResultSetColumn( cs3.getName( ) );
tcell.getContent( ).add( data3 );