Jump to content
We've recently updated our Privacy Statement, available here ×

From multiple resource bundles to only one


giuliana.damiani

Recommended Posts

Hi, 

I have 20 reports loaded on Jasper Server and for each I have loaded its specific resource bundle. It's possible to unite all the 20 resource bundles files in only one file? I try to put the file in the "Reports" folder  or in the "Data Source", but it doesn't work...In this way when I want modify the same label in more reports, I modify one file!
 
Thank you so much
Link to comment
Share on other sites

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

Yes you can, actually is a best practice to add the resource bundles as repository elements and link them to your report units, instad of adding them to the report unit itself.

If you look ad the provided samples (under /Public/Samples) most of the reports there use the same set of .properties files and they are locared in the repository in /Public/Samples/Resources you will see that we do the same for the report input controls.

This allows you to reuse common components form different reports. When you need to attach that to the report form JasperSoft Studio when you create a new object in the report instad of choosing Resource Bundle of Input Control just select "Link" and JSS will ask you what resource in the repository you want to link to.

Link to comment
Share on other sites

marionol thank you so much for your answer!

I see the reports in the Samples, but they have their specific resource bundle. For example the "Department" report have its resources bundles in its folder "Resources".I don't want this. I would like to have a global "Resources" folder from wich all the reports can get information. There is? 

 

 

 

Link to comment
Share on other sites

  • 10 months later...
  • 3 weeks later...

Hi Giuliana,

Thank you very much for the help provided.

Could you explain a little bit better the steps needed to accomplish such thing?

Do I need to send the resource bundle to the filesystem of the server? and how would I create a link from that filesystem file on the report unit?

 

Thank you very much again for the help.

 

With kind regards,

Rodrigo Carvalheira

Link to comment
Share on other sites

  • 5 weeks later...

Hi Rodrigo,

 

1. create a new Resource Bundle object in Jasper Server i.e. "labels_en.properties"

2. create a Report Unit with the report containing the resource bundles property set to "labels"

3. copy the resource bundles "labels_en.properties" and "paste as link" in the Report Unit.

 

In this way your report will be localized in english and when you will modify the "labels_en.properties" resources bundles this change will propagate to all the report using that.

 

This time, I hope I have been clear,

 

Bests,

 

Giuliana

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...