You are not logged in.
Pages: 1
Dear all,
I'm tring to set-up the french localization for numbers coming from Jasper Report (In Jasper Studio, that's work fine) , they are currently with en-US Localization.
I uploaded this localization.cf without success :
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<localization>
<default>fr</default>
<format>
<shortDatePattern></shortDatePattern>
<longDatePattern></longDatePattern>
<shortTimePattern></shortTimePattern>
<longTimePattern></longTimePattern>
<shortDateTimePattern></shortDateTimePattern>
<longDateTimePattern></longDateTimePattern>
<numberPattern># ##0,00</numberPattern>
<currencyPattern># ##0,00€</currencyPattern>
<integerPattern># ##0</integerPattern>
<percentPattern></percentPattern>
</format>
</localization>
</configuration>
Any idea ?
Last edited by phenaut (2017-11-15 17:36:12)
Offline
Hi phenaut,
did you restart your reportserver or reloaded the configuration opening the terminal and writing "config reload"?
Where did you "upload" the file localization.cf ?
Regards,
Eduardo
Offline
Hello Eduardo,
I restarted the server with config reload ans I uploaded the file directly from the back office over /etc/main/
With the first files (first post), I lost the date format and was unable to select date in drop down list box, so the localization.cf is used.
I made a new test with this one :
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<localization>
<default>fr</default>
<format>
<!--
<shortDatePattern></shortDatePattern>
<longDatePattern></longDatePattern>
<shortTimePattern></shortTimePattern>
<longTimePattern></longTimePattern>
<shortDateTimePattern></shortDateTimePattern>
<longDateTimePattern></longDateTimePattern>
-->
<numberPattern># ##0,00</numberPattern>
<currencyPattern># ##0,00</currencyPattern>
<integerPattern># ##0</integerPattern>
<!--
<percentPattern></percentPattern>
-->
</format>
</localization>
</configuration>
Only number are modified and this has no effect, the decimal separator stays '.' and the thousand ','
Any suggestion ?
Offline
Hello Eduardo,
this issue is still pending... I see the dynamic lists are correct but not the jasper reports. I think it's not a problem of localization.cf but a problem with the value REPORT_LOCALE wich is still in 'US'. how to force the parameter REPORT_VALUE to 'fr' in reports, for your help :
https://community.jaspersoft.com/docume … rt-locales
Thanks a lot for your feed back.
Best Regards.
Offline
Hi phenaut,
it seems jasper locale is not correctly set, as you point out. Where exactly did you see that "REPORT_LOCALE" is still "US"?
You should also have the reportserver parameter "_RS_LOCALE", which should be "fr" if you select french. This is an implicit parameter available in all reports.
Could you also check with BIRT? In BIRT it should work, since the locale is being explicitly set. In BIRT, the locale is set to the "_RS_LOCALE" value.
For your information: we are investigating this issue in the ticket RS-2878.
Regards,
Eduardo
Offline
Hello Eduardo,
I'm not able to see in ReportServer the value of "REPORT_LOCALE", I said it's still 'US' because from JasperSoft Studio, i can switch the REPORT_LOCALE value between 'US' and 'FR' ans I saw the same behaviour.
Regarding BIRT, every thing is correct from this side the format 'FR' is well understood by Reportserver.
Is there a workaround to set the value of "_RS_LOCALE" directly via the admin ?
Thanks a lot for your support.
Offline
Hi phenaut,
I have been testing, and I see in jasper the correct locale when I print a dynamic string with the following:
"Locale: " + $P{REPORT_LOCALE}
The REPORT_LOCALE parameter is an implicit jasper parameter. In my case I am seeing the correct locale I chose: "Locale: de_DE".
I am choosing german when I log in into reportserver.
Can you please check this?
1. Log in to reportserver selecting french as a language
2. execute a jasper report that prints its locale using: "Locale: " + $P{REPORT_LOCALE}
Regards,
Eduardo
Offline
Hi phenaut,
ok, when I select another language I still see "de_DE" in jasper. It seems it gets the default locale in the system, not the selected one.
BIRT behaves differently: if I print the locale using
"Locale: " + reportContext.getLocale().toString()
I see the selected locale.
This seems to be a bug. I will update here when I have more information.
In the meanwhile, check this: https://forum.reportserver.net/viewtopic.php?id=222 , #4 in order to set the jasper "REPORT_LOCALE" parameter by-hand. As this should happen by default (without the script), I think this is a bug. Keep tuned, I will update this thread.
Regards,
Eduardo
Offline
Hello Eduardo,
I found a workaround that works for single report not for books.
I added manually on the top of report source :
<property name="net.sf.jasperreports.export.xls.detect.cell.type" value="true"/>
This line is not allowed in book,
any idea ?
Last edited by phenaut (2019-02-04 17:15:14)
Offline
Hi phenaut,
pls note that as of ReportServer 4.4.0, the REPORT_LOCALE parameter will be sent automatically to the Jasper engine.
Regards,
Eduardo
Offline
Pages: 1