Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
dispalying different images in a column based on value of another column
andyf
I have a column in a data set which will be either a positive or negative integer. I would like to display an up arrow or down arrow next to the column depending on the sign of the integer. What's the easiest way to do this?
Thanks!
Find more posts tagged with
Comments
Clement Wong
You can add an image control that has a conditional statement to control the image displayed.<br />
<br />
First, add a new column next to your value. Then, drop an image control there.<br />
<br />
In the location of image, create a Javascript expression that will look at the negative/positive value, and display an appropriate icon.<br />
<br />
For example:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>if (row["SampleColumn"] > 0.0)
"http://webserver/thumb_up.png";
else if(row["SampleColumn"] < 0.0 )
"http://webserver/thumb_down.png";
else
"http://webserver/even_thumb.png";</pre>
<br />
Attached is a sample design using URI images.<br />
<br />
<br />
Regards,<br />
Clement Wong<br />
Actuate Corporation ? The BIRT Company?