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)
rptdesign in version 3.2.23 provokes error
Lyth
Hello everyone,<br />
<br />
I'm trying to internationalize some titles in Birt. I'm using Birt report viewer and simply used a birt tag in my jsp to display my report. <br />
<br />
It worked nice until I tried to internationalize some titles. I created a resource.properties file with my key=value association. My rptdesign is set to version 3.2.23 instead of 3.2 once I have referenced my key. <br />
<br />
Next, I get the following error when my jsp is loaded : <br />
<blockquote class='ipsBlockquote' ><p>The file reporting.rptdesign has error and can not be run</p></blockquote>.<br />
<br />
Would someone know what's happening? Any idea to explore ? I changed the jars used by birt : took the jars from birt v4.2 instead of birt v3.7 but got the same error.<br />
<br />
Edit : the problem seems to be independant of internationalization itself. Simply changing the version to 3.2.23 makes an error. I tried to put a later version like 3.2.6 but each time I reference a key, the version is set back to 3.2.23 as if it was the only version taking internationalization into account !<br />
<br />
Thanks in advance !
Find more posts tagged with
Comments
Lyth
I managed to overcome the error by using the WebViewerExample of the latest birt, which I deployed in a tomcat with my rptdesign. In this case, no error linked to the version 3.2.23. However the internationalization doesn't seem to work for moment...
JasonW
Did you put the .properties file in the resource folder of the viewer? Did you add the properties file to the report using the add resource menu in the properties view for the report design?
Jason
Lyth
Thanks for your answer,
There was not a resource folder so I didn't think there should be one... I'm going to try and create one.
JasonW
Make sure to check the web.xml in the web viewer and specify the directory in it.
Jason
Lyth
Hi,<br />
<br />
I checked the web.xml and found this : <br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'><!-- Resource location directory. Defaults to ${birt home} -->
<context-param>
<param-name>BIRT_RESOURCE_PATH</param-name>
<param-value></param-value>
</context-param></pre>
<br />
I guess birt home is the WebContent folder ? So I put the .properties in it. And I have got this in the xml source of the design after referencing the resource in english (see image below): <br />
<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'><simple-property-list name="includeResource">
<value>WebContent/resources_en</value>
</simple-property-list></pre>
<br />
I can put my .properties anywhere, I can see the language change in eclipse. But once in the browser, it displays the default text.<br />
<br />
<br />
Edit : I found a "Message.properties" in the src of the web viewer, in package org.eclipse.birt.report.resource. I tried to put my resources in this folder but it didn't work either x(<br />
<br />
Did everything in there <a class='bbc_url' href='
http://wiki.eclipse.org/BIRT/FAQ/Internationalization'>http://wiki.eclipse.org/BIRT/FAQ/Internationalization</a>
; but doesn't work...<br />
<br />
Here is at this moment the location where I referenced my properties : <br />
<br />
<img src='
http://s17.postimage.org/dq8tqx767/BIRTi18n.png'
alt='Posted Image' class='bbc_img' /><br />
<br />
And my path in the xml : <br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'><!-- Resource location directory. Defaults to ${birt home} -->
<context-param>
<param-name>BIRT_RESOURCE_PATH</param-name>
<param-value>resource/</param-value>
</context-param></pre>
JasonW
First set a resource folder in the designer. IE create a folder in your workspace that is named something like resources. Copy your message files there. Open the preferences (Windows->preferences->Report Design>Resource . Select the folder you in the workspace you created. Then in the report delete the resources you added in the report. Re add only the resource file. The one with the additional locales are not needed. These will be discovered automatically when running. You can set the preview locale in the preferences to test different locales. In the deployed environment create a folder called resources on the same level as webcontent, not nested. In the web.xml put resources for the value of the resource folder. Copy all the message files here and deploy the report.
Jason
Lyth
I don't understand the part on the workspace. I could already preview and see the right language in Eclipse. However thanks for the pieces of information.<br />
<br />
My problem is entirely about displaying the right language in the browser.<br />
<br />
So here is what I did : <br />
<br />
<img src='
http://s14.postimage.org/bsqx7o1f5/birt_structure.png'
alt='Posted Image' class='bbc_img' /><br />
<br />
In the report I referenced the "resources.properties" file only , without the _language extensions. I modified the web.xml and the web-template.xml with this on both :<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'><!-- Resource location directory. Defaults to ${birt home} -->
<context-param>
<param-name>BIRT_RESOURCE_PATH</param-name>
<param-value>${birt.viewer.working.path}/resources</param-value>
</context-param></pre>
<br />
I also tried this on both :<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'><!-- Resource location directory. Defaults to ${birt home} -->
<context-param>
<param-name>BIRT_RESOURCE_PATH</param-name>
<param-value>resources</param-value>
</context-param></pre>
<br />
Also tried with "/resources" since we can see this in the web.xml : <br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'><jsp-config>
<taglib>
<taglib-uri>/birt.tld</taglib-uri>
<taglib-location>/WEB-INF/tlds/birt.tld</taglib-location>
</taglib>
</jsp-config></pre>
<br />
But nothing made the browser display the right language. <br />
<br />
What is the web-template.xml ? Should the same configurations as in web.xml be in it ? Or should they be slightly different ?<br />
<br />
It doesn't seem to work when the configurations are the same
<br />
<br />
In WEB-INF I have the following files : jrun.web.xml, server-config.wsdd, viewer.properties, web.xml, weblogic.xml, web-template.xml. Should I change any other file ?<br />
<br />
I also tried specifying the absolute path to the resource folder with this in the xml to allow it : <br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<context-param>
<param-name>WORKING_FOLDER_ACCESS_ONLY</param-name>
<param-value>false</param-value>
</context-param></pre>
<br />
Didn't work either.