f.zehnder
(F Zehnder)
1
Does JMix pass the locale to the Jasper Reporting ?
For me, this does not seem to be the case, as my numbers are wrong formatted ;/
new DecimalFormat("#,##0.00").format($F{Soll})
Seems to miss the Locale Param …
params.put(JRParameter.REPORT_LOCALE, Locale.ITALY);
JasperFillManager.fillReportToFile(jasperReport, params);
f.zehnder
(F Zehnder)
3
Hi @asshleyymariei
Thank you for your comment 
I know, that this is possible. My question was, if JMix does so !
My call to the report is
Report report = getReportByCode("AC2");
if ( report != null ) {
Set<Account> accounts = accountsDataGrid.getSelectedItems();
uiReportRunner.byReportEntity(report)
.withOutputType(ReportOutputType.PDF)
.withParametersDialogShowMode(ParametersDialogShowMode.YES)
.addParam("Accounts", accounts ) // Parameter alias
.runAndShow();
}
I don’t see any access to the JasperFillManager …
After reading, my comment, I found a workaround 
uiReportRunner.byReportEntity(report)
.withOutputType(ReportOutputType.PDF)
.withParametersDialogShowMode(ParametersDialogShowMode.YES)
.addParam("Accounts", accounts ) // Parameter alias
.addParam(JRParameter.REPORT_LOCALE, getLocale())
.runAndShow();
But I think, JMix should set this locale by default already 
Regards
Felix
shchienko
(Nikita Schienko)
5
Hello @f.zehnder,
It’s right. The Reports add-on does not set the locale in Jasper reports. You can create a formatter for your field or use your own workaround.
Regards,
Nikita
f.zehnder
(F Zehnder)
7
Hello @shchienko
I think you should add this to the documentation, that with
.addParam(JRParameter.REPORT_LOCALE, getLocale())
the programmer has to set to locale.
Regards
Felix