The windows installed on my machine has the locale en_AU
and that's what JasperReports 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?
jasper. properties is looked up by jasper reports in the classpath, so it can be directly in the WEB-INF/classes folder, or in the root folder of any of the jars in WEB-INF/lib.
The default expression language is Java, but if you are not a programmer, we recommend that you design your projects with JavaScript or Groovy because those languages hide a lot of the Java complexity.
An introduction to JasperReports Server and its key capabilities. JasperReports Server is a stand-alone and embeddable reporting server, enabling delivery of mission critical information on a real-time or scheduled basis to the web, to the printer, or to a variety of file formats.
The locale is set during execution, not in the JRXML.
Using Java, set the REPORT_LOCALE
parameter for the report's parameter map. For example:
InputStream reportTemplate = getReportTemplate(); JRDataSource dataSource = getDataSource(); java.util.Map parameters = getParameters(); java.util.Locale locale = new Locale( "en", "US" ); parameters.put( JRParameter.REPORT_LOCALE, locale ); JasperFillManager.fillReport( reportTemplate, parameters, dataSource );
Using Jaspersoft Studio, open the project properties dialog to the Report Execution area:
Using iReport, set the report locale in the Options window under the "Report execution options" section in the General tab. This will set the report locale when run.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With