honza.brtek Posted February 17, 2020 Share Posted February 17, 2020 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 Link to comment Share on other sites More sharing options...
honza.brtek Posted February 17, 2020 Author Share Posted February 17, 2020 I'll hand over resourceBundle & report locale into the menthod to build a final String.Please, let me know if you have a smoother solution.Thank you! Link to comment Share on other sites More sharing options...
I am Leo Posted February 19, 2020 Share Posted February 19, 2020 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");[/code]Hope this can help you. Link to comment Share on other sites More sharing options...
honza.brtek Posted February 19, 2020 Author Share Posted February 19, 2020 Thank you, will try! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now