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)
Color Change in table row
CaTcHmE
<span style='font-family: Arial'><br />
Hi to All,<br />
<br />
Please help me to resolve the problem,<br />
I have a table in a report where i need to set alternate color for the table row. I have done it, but in the JOBTITLE column if the value is consecutively repeating means i need to set color as next alternate color. i.e gray. For example the row constains emp no 1286,1323,1370 should be in gray color.<br />
Same as in the second highlighted rectangle box should be in silver color.<br />
<br />
I have also enclosed the image and rptdesign.<br />
<br />
<br />
<br />
Kindly help me to fix the problem.<br />
<br />
<br />
Thanks in Advance.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
</span>
Find more posts tagged with
Comments
thuston
I don't see the screenshot or report.<br />
I assume you're currently doing rownum % 2 as your highlight rule.<br />
<br />
If you need to compare to a previous row, you'll need two global variables. One for tracking color changes and one to track the previous row's value.<br />
Then you can do something like this:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>if ( previousRowVar != currentRow - 1 ){countVar++;}
countVar % 2;</pre>