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

Several languages(java.util.Locale) in report


eduablitas

Recommended Posts

Hi and thanks in advance.

I wonder if its possible to have the main report in spanish

HashMap<String,Object> params = new HashMap<String,Object>();[/code]
params.put("REPORT_LOCALE", new java.util.Locale("ES");[/code]
JasperPrint print = JasperFillManager.fillReport(report,params,ds);// ds is a JRBeanCollectionDataSource with list of one ReportBean[/code]

The structure of ReportBean is:

  • OtherBean attribute1
  • List<OtherBean2>attribute2

Then i design to show the attribute2 data with a table object in iReport with one subdataset

This list i send to iReport like a parameter in main report like this:

params.put("myDsTableParam", new BeanDataSource(listOfBeans);//where "BeanDataSource" is a implementation of JRDatasource and lisfOfBeans is the list to send the table in iReport[/code]

So i wonder if its possible to send my 2nd locale (english) to my dataset and get that i want that its text in my report from a message resource file ( $R{message.someKey} ) in spanish and data in table details with english locale language to show number in english formats.

 

Its possible??

 

Regards and sorry for me english :(


 

 

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Nothing? No way that the report working with multiple languages ​​simultaneously?.

I try to do it with subreports but i have the same problem. I can't set REPORT_LOCALE to subreport without changing the main report "REPORT_LOCALE" parameter.

Any way to do that?

Please need help!!

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...