|
Re: Report Scripting : change cell background [message #144663 is a reply to message #144596] |
Thu, 16 March 2006 18:39 |
|
You can set the background of a cell using the onCreate and
this.getStyle().backgroundColor = "blue";
I assume you want to do this based on a value in the control on the cell.
If you have a value in a data element called samplevalue in the cell and
you color the cell if this value is > 5,
then in the onCreate of the row you could.
if( this.getRowData().getExpressionValue( "row[SampleValue]" ) > 5 ){
yellowme = true;
}else{
yellowme = false;
}
define yellowme in initialize
yellowme = false;
finally on the chosen cell
if( yellowme ){
this.getStyle().backgroundColor = "Yellow";
}
I dont think this will work if you try to to set it on the getValue() of the
control, because by that time the onCreate has already been executed on the
cell.
Jason
"Dov MORYUSF" <moryusef@hotmail.com> wrote in message
news:dvc6nk$kh8$1@utils.eclipse.org...
> Hi to all,
>
> Is it possible to change in a row the background of a unique cell ?
>
> I've found examples for changing the background of a whole row but not for
> a cell:
> http://www.eclipse.org/birt/phoenix/deploy/reportScripting.p hp
>
> Thanks a lot for your help
>
> DM
|
|
|
|
Powered by
FUDForum. Page generated in 0.03083 seconds