Reputation: 542
Is it possible to overwrite the Param REPORT_LOCALE via Scriptlet, or directly in IReports ?
Pseudocode:
if($P{MYLOCALEPARAM}== 1) REPORT_LOCALE = "en_US";
if($P{MYLOCALEPARAM}== 2) REPORT_LOCALE = "de_GE";
....
I start the reports via
"RunJasper.jar"
(gtwebmarque.com)
via PHP exec and i am loath to change and recompile this tool ...
I know that there are some localisation Options in IReport Options Tabs. But i would like to implement it dynamicly
BR Christian
Upvotes: 1
Views: 17625
Reputation: 22857
You can set locale with help of JasperReports API.
The sample:
Map params = new HashMap();
params.put(JRParameter.REPORT_LOCALE, Locale.US);
JasperFillManager.fillReportToFile(compiledReportName, params);
Upvotes: 4