1
votes

Using IcCube reporting V6, I know how to conditionnaly color cells of a table in a column (or list of columns) depending on their values.

enter image description here

Is there a way to conditionnally color a complete row depending on it's label ? For example, I'd like to color the row in red if it's label is "server" or maybe only values for this row.

enter image description here

I guess the starting point is to use a Cell Renderer of "Ad-Hoc Expression" type, But I don't know how to write it.

enter image description here

1

1 Answers

1
votes

There are couple of ways to do so in IcCube 6.2:

Ad-Hoc Expression

There is possibility to use expression as a filter function to apply whole cell renderer to a cell/row/column

In this specific case you might want to use (it expects exactly "true" string):

return context.rowLabel() == 'Server' ? 'true' : 'false'

icCube 6.2 (4217)+

Return value could be "true" or true:

return context.rowLabel() == 'Server'

Demo report


Color Expression

If your only goal to change a background/text color of a selected cell/row/column you might want to use color expression :

if(context.rowLabel() == 'Server'){
    return "#f2a2a5"
}

return null

enter image description here