Hi all, I am having the following problem. In the detail band I get a very specific field from the database which requires further processing. So I call a Java method inside a textField to process this requirement.
content of the textfield: ReportUtils.testMethod($F{FIELD_FOR_PROCESSING})
Sadly, part of the returned String has to be a resource bundle reference. When I return "$R{id}" just to test the functionality, reference is not replaced.
printed output: $R{id}
wanted output: ID (taken from the resource bundle)
I have few ideas for a workaround but none of them is "nice". Do you have any suggestions on how to solve it, please?
Thank you in advance, Jan
3 Answers:
I am working with a Java application to create PDF.
In my application,
I use i18n as ResourceBundle to get the text base on Locale.
And in my method, I return a string from i18n bundle resource I want.
java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("localization/i18n", Locale.JAPAN); return bundle.getString("id");
Hope this can help you.