views:

2028

answers:

1

The windows installed on my machine has the locale en_AU and that's what Japer uses. I already tried changing the locale of all users, including the Administrator but it still uses en_AU.

How can I change that locale? Is it possible to change the REPORT_LOCALE parameter on my report?

+4  A: 

The locale is set during execution and is not stored in the JRXML file.

If you run the report through iReport, it is possible to set the report locale in the Options window under the "Report execution options" section in the General tab. This will change how iReport runs your report.

If you run the report embedded in Java, you set the REPORT_LOCALE parameter, like you mention. The following code is what I use:

Locale locale = new Locale("en", "US");
metadata.put(JRParameter.REPORT_LOCALE, locale);

Where metadata is the parameter map sent to fillReport(...).

waxwing
+1 quite correct, saved me some time.
Bozho