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)
access values in a properties file
wondermike
Hello, I have a problem accessing values stored in a properties file from a report.<br />
I'm trying to use a dynamic text field and inside that I've placed the following code:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>"Site:" + reportContext.getMessage("site", reportContext.getLocale())</pre>
Then I have a properties file named <strong class='bbc'>reportname_de_DE.properties</strong> with the following content:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>site=XYZ</pre>
Instead of getting the expected result, I'm getting "Site:null".<br />
I've tried several locations for the file, I've tried the whole thing WITHOUT i18n (which is actually what I need), I've tried several file names, all without success.<br />
How can I get this to work?<br />
TIA Michael
Find more posts tagged with
Comments
mwilliams
Did you set the Resource File in the resources section of the property editor for the report?
CBR
Please keep in mind to only add the default language properties file.
Eg. If you have your properties file named reportname_de_DE.properties
the _de_DE says that it is for german settings. You ll need to have another one named reportname.properties that is used for all other locales. This is the only one to add to the report as mentioned in post above.
wondermike
@mwilliams
: Yeah, thanks, that was the solution!
The thing works now. I was really desperate... :wacko:
@cbrell
: Thanks for the additional hint!
@cbrell
: I've been in your training in November 2010 in Mannheim (M.K. aus Homburg). It's a small world.