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 change style of element in java script?
Paradoxx
<p>Hello!</p><p> </p><p>Is it possible to change the style of some specific element (for example, the cell of table) dynamically in java script (e.g. change style of cell from 'data-style-1' to 'data-style-2')? It seems to be some basic functionality, but I can't find a way to do it.</p><p>I have found solutions to change style of whole report (via including different css files), but I need to deal with specific tables and cells and BIRT native (not external css) styles.</p><p> </p><p> </p><p>And one more question. In BIRT styles we have "Format number" tab, where three properties can be set:</p><p>- category (e.g. "Currency", "Fixed", "Custom")</p><p>- format string for "custom" format (e.g. "###,##0")</p><p>- locale (e.g. "en_US")</p><p> </p><p>This settings can be seen in report source XML:</p><div><pre class="_prettyXprint _lang-xml"> <style name="data-format" id="717"> <structure name="numberFormat"> <property name="category">Custom</property> <property name="pattern">###,##0</property> <property name="locale">en_US</property> </structure> </style></pre><p>I have found a way to set "category" and "pattern" properties dynamically in java script:</p><p>this.getStyle().numberFormat= ... </p><p>this.getStyle().numberFormatCategory= ...</p><p> </p><p>So, the question: is there any way to change number format "locale" property in java script?</p></div>
Find more posts tagged with
Comments
micajblock
<p>Check out this DevShare:</p><p> </p><p><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/devshare/_/designing-birt-reports/1343-new-advanced-localization-technique'>http://developer.actuate.com/community/devshare/_/designing-birt-reports/1343-new-advanced-localization-technique</a></p>
;
Paradoxx
<blockquote class="ipsBlockquote" data-author="mblock" data-cid="122539" data-time="1384835302"><div><p>Check out this DevShare:</p><p> </p><p><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/devshare/_/designing-birt-reports/1343-new-advanced-localization-technique'>http://developer.actuate.com/community/devshare/_/designing-birt-reports/1343-new-advanced-localization-technique</a></p></div></blockquote><p>Thank
you!</p><p>I use BIRT 2.5.1 now, it doesn't support this technique. But at least now I know one more reason to upgrade BIRT version in my system
</p><p> </p><p>P.S. I use java code to perform custom number formatting now (similar to your old dev share), just wanted more elegant solution with styles.</p>
kosta
<p>Hello BIRT community,</p>
<p> </p>
<p>can we get the solution for this problem, since the linke here doesnt works.</p>
<p> </p>
<p>Best Regards,</p>
<p>Kosta</p>
micajblock
<p>How about this link - <a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/files/file/1078-new-advanced-localization-technique/'>http://developer.actuate.com/community/forum/index.php?/files/file/1078-new-advanced-localization-technique/</a></p>
;