Conditional color formatting based on instr in BI Publisher [message #654285] |
Fri, 29 July 2016 05:47 |
![](//www.gravatar.com/avatar/c08d02c9ef5e86fe3aa3a29e0b8c28d7?s=64&d=mm&r=g) |
ekarolyi
Messages: 1 Registered: July 2016
|
Junior Member |
|
|
I am trying to implement conditional color formatting of a column contents based on whether or not the item that is supposed to appear in the column contains certain substring
Very simplified, if the item contains the string "SUB" I need the item to appear with red foreground color, otherwise it should be black.
I tried various syntaxes,the ones that do not produce error either do not display the item at all or do not bother to re-color it
Two of the options I tried:
<?xdofx:if (Instr(ITEMNAME, 'SUB',1) !=0)>
<xsl:attribute
xdofo:ctx="incontext" name="foreground-color">red
</xsl:attribute>
<?end if?>
<?xdofx:if Instr(ITEMNAME, 'SUB',1)!=0 then attribute@incontext:color;'red' end if?>
Can anyone tell me what is wrong and what the correct syntax would be?
Actually, I would prefer to only have this substring in the item colored red and the rest of the string staying black, but I am not seeing any way of achieving this - if anyone has an idea, that is more than welcome
[Updated on: Fri, 29 July 2016 05:58] Report message to a moderator
|
|
|