Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
How can i access to a row value in birt report?
mariane
Hi,
I have a column in my report named "product_id":i need to modify the color of row value according a condition:"prod0004vet"
"prod" and "vet" must be colored in green and
0004 must be colored in red
but i don't find a method in script that help me to browse this string and separate alphabets to numbers.
thanks
Find more posts tagged with
Comments
mwilliams
Hi mariane,
So, "prod0004vet" is the actual column value and you want the text to be colored 2 different colors?
mariane
hi Michael
yes, i want color alphabet and numbers with two different colors
mwilliams
mariane,<br />
<br />
If you switch out your data item in your table for a text item. You can set the text items's type to html and do something like the following to have different colors for different parts of the text.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<VALUE-OF format="HTML">temp1 = row["CUSTOMERNUMBER"].toString().substr(0,1);
temp2 = row["CUSTOMERNUMBER"].toString().substr(1,1);
temp3 = row["CUSTOMERNUMBER"].toString().substr(2,1);
"<font color = " + "'" + "red" + "'" + ">" + temp1 + "</font>" + "<font color = " + "'" + "yellow" + "'" + ">" + temp2 + "</font>" + "<font color = " + "'" + "red" + "'" + ">" + temp3 + "</font>"
</VALUE-OF>
</pre>
<br />
Hope this helps.