[#10286] - Translations in lists

Category:
Bug report
Priority:
Normal
Status:
New
Project: Severity:
Minor
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:
0

Hello

I originally filed this bug report to the Jasper studio but as you can read in https://community.jaspersoft.com/jaspersoft-studio/issues/10256 morlandin asked me to resubmit this bug report as a jasper library bug.

When passsing a resource bundle via the parameter REPORT_RESOURCE_BUNDLE to a report the contents of a list component doesn't get translated. It seems that you need to pass the resource bundle using a dataset parameter:

```
<datasetParameter name="REPORT_RESOURCE_BUNDLE">
<datasetParameterExpression><![CDATA[$P{REPORT_RESOURCE_BUNDLE}]]></datasetParameterExpression>
</datasetParameter>
```

If one fails to pass the parameter to the list component, Jasper reports tries to fetch the resource bundle using the 'Resource Bundle' property of the report. Since this reference to a file is not available when we generate the report ourselves (cause we are using the REPORT_RESOURCE_BUNDLE parameter) a java.lang.Exception is thrown during the report generation process issued by `JasperFillManager.fillReport(...)`.

This is quite tedious boilerplate code and error-prone. Is there a way to avoid this?

Best Regards
Thomas

v6.4
List
tcleenewerck's picture
Joined: May 2 2011 - 6:48am
Last seen: 3 months 2 weeks ago
Feedback
randomness