How to Internationalizing Input Controls in Jasper

Posted on by By admin, in Jaspersoft | 0

Prerequisites: Jasper studio7 professional.
Database: Foodmart.

  1. Create a sample report with food mart database.
  2. Drag and drop a Text field from palette tab in right hand side.
  3. In the text field enter text field as below shown image.
  4. text field enter text field

    Here “R” meaning Internationalizing of field in jasper.

  5. We need bundles to get the locale language. For that we are going to create two properties files.
  6. Create the localereport.properties file: Country=country in English.
  7. Translate the text as required, and save it as localereport_fr.properties: Country=pay
  8. Click on report name and go to Resource bundle properties, there you can give name as localereport.
  9. Deploy the report in jasper server.
  10. Go to Jasper studio and select report from the jasper server repository.
  11. Here we can add resource bundle from the local.
  12. Right click on report>Select New> Select Resource Bundle.
    Select Resource Bundle

  13. Repeat this for all languages using the example: localereport_fr.properties
  14. In the jasper server create a parameter globally.
  15. Input Control –> Add Resource –> Click on Input Control.

  16. Select single value type and in the Prompt Text you should give as below shown in image.
  17. single value type

  18. In the Set the Datatype Kind and Properties section mention name as below.
  19. Properties section mention name

  20. Save and run the report with appropriate locale. You will get the result as below.

Save and run

logo

Best Open Source Business Intelligence Software Helical Insight is Here

logo

A Business Intelligence Framework

In case if you have any problem please get us at support@helicaltech.com

Thank You
Eswar
Helical IT Solutions Pvt Ltd

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments