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)
Change Resource File Dynamically
Monica D
Hi,
How to change a resource File dynamically in Birt Report?
We have an application where user can click on link and select the language for report So want to change the labels according to the language selected.We are using Birt 2.5. Kindly let me know how to do it
Regards,
Monica Dayaramani
Find more posts tagged with
Comments
kclark
<a class='bbc_url' href='
http://www.birt-exchange.org/org/devshare/designing-birt-reports/1119-localizing-birt-reports-with-report-parameters/'>Take
a look at this devshare</a> it does what you are trying to do. It has a parameter that allows the user to select either English or French and then changes the report accordingly.<br />
<br />
in the beforeFactory() of the report<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
importPackage(Packages.java.util);
lc = new Locale(params["Locale"].value);
</pre>
<br />
Is used to get the locale and<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>this.text = reportContext.getMessage("employeenumber", lc);</pre>
<br />
Is used in the onCreate of each table item to set the locale.