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)
How to set style to an element based on its value dynamically?
Mani Kandan
<p>I am developing birt report in eclipse luna and my birt version is 4.4.1. I have created a style in report(right click on report, style->newstyle, and then applying that style to an element. But i want this style to be applied to a data on the detail row, based on the value i need to set this style dynamically.. How can i achieve this?</p>
<p> </p>
Find more posts tagged with
Comments
JFreeman
<p>What all are you wanting to modify with your styles? </p>
<p> </p>
<p>If is only a couple of things, you can modify styling through scripting on the element like this:</p>
<pre class="_prettyXprint _lang-js">
this.getStyle().backgroundColor = "#73C2FB";
</pre>
<p>You can also use external CSS file to modify styling.</p>
<p>Take a look at these examples of using external CSS:</p>
<ol><li><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/files/file/510-birt-dynamically-choose-css-file/'>http://developer.actuate.com/community/forum/index.php?/files/file/510-birt-dynamically-choose-css-file/</a></li>
;
<li><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/files/file/902-dynamic-styling-using-beforefactory-method/'>http://developer.actuate.com/community/forum/index.php?/files/file/902-dynamic-styling-using-beforefactory-method/</a></li>
;
</ol>