#1 2023-06-05 21:35:42

iamakimmer
Member
Registered: 2021-12-15

dynamic locale

Is there a way to pass in a locale when pulling report via API? For example, for an orders report, I would like to send it different locales so it can format a specific date and currency.

Something like

/reportserver/httpauthexport?locale=en (this would output $ and MM/DD/YYYY)
/reportserver/httpauthexport?locale=uk (this would output £ and DD/MM/YYYY)

Offline

#2 2023-06-06 11:21:19

iamakimmer
Member
Registered: 2021-12-15

Re: dynamic locale

If this is not possible, is it possible to somehow share reports or use same file system across multiple report server instances?

Offline

#3 2023-06-06 12:31:20

iamakimmer
Member
Registered: 2021-12-15

Re: dynamic locale

Offline

#4 2023-06-07 08:07:23

eduardo
Administrator
Registered: 2016-11-01
Website

Re: dynamic locale

Hi iamakimmer,

if you log in normally into ReportServer with the different locales, do you already see the correct output in your specific report ? I.e. $ / £ and MM/DD/YYYY  /  DD/MM/YYYY ?

Can you pls post a screenshot of your ReportServer -> System Console -> General Info ? (you can use http://imgbb.com for this)

Regards,
Eduardo

Offline

#5 2023-06-07 17:53:35

iamakimmer
Member
Registered: 2021-12-15

Re: dynamic locale

Thank you so much eduardo,

We are running a much older version of report server (RS3.0.2-5855) so I think that's why we don't see system console/general info as an option. However,

When running my birt report directly through birtdesigner and setting my Eclipse locale to English(UK), I do see the currency being formatted properly:

Screenshot-2023-06-07-at-1-44-47-PM.png

When logging in reportserver using /reportserver/?locale=de  and running the report, I do seem to get the comma localization but the currency is shows a strange character:

Screenshot-2023-06-07-at-1-48-40-PM.png

The formatting I'm using in the birt report is:

Screenshot-2023-06-07-at-1-51-54-PM.png

Offline

#6 2023-06-07 17:59:43

eduardo
Administrator
Registered: 2016-11-01
Website

Re: dynamic locale

Hi iamakimmer,

if I remember correctly, this was fixed / added to newer versions of ReportServer, so pls test the same with the newest RS version.

You can try it by installing a test installation (use the .exe and click on next-next-next, 10 min test-installation). If the report works in the new version, you know you can upgrade for this to work smile

Regards,
Eduardo

Offline

#7 2023-06-07 20:59:04

iamakimmer
Member
Registered: 2021-12-15

Re: dynamic locale

Hi eduardo,

I've set up another reportserver instance using 4.6 and tried with reportserver/?locale=fr

I now get correct comma structure but still the $:

Screenshot-2023-06-07-at-4-54-35-PM.png

Will this always force a US currency because my region is set to US on the report-server itself? I have the default localization file:

Screenshot-2023-06-07-at-4-58-25-PM.png

Last edited by iamakimmer (2023-06-07 20:59:56)

Offline

#8 2023-06-12 07:32:11

eduardo
Administrator
Registered: 2016-11-01
Website

Re: dynamic locale

Hi iamakimmer,

yes, in this case, if you pass reportserver/?locale=fr, the locale used will be fr_US

If you change your .cf to FR, it should use the correct one: fr_FR
but of course this will not be as dynamic as you need.

What happens if you pass reportserver/?locale=fr_FR ?

Regards,
Eduardo

Offline

#9 2023-06-12 14:36:20

iamakimmer
Member
Registered: 2021-12-15

Re: dynamic locale

Hi eduardo,

If I pass in locale=fr_FR, then I see the reportserver in english, like it can't understand the locale?

Screenshot-2023-06-12-at-10-33-21-AM.png

If I do just locale=fr, then I do see the language in French but still in USD as you said:

Screenshot-2023-06-12-at-10-33-10-AM.png

Offline

#10 2023-06-12 15:02:28

eduardo
Administrator
Registered: 2016-11-01
Website

Re: dynamic locale

Hi iamakimmer,

yes, correct, this is not currently supported. I raised RS-7505 for this and we will try to support in the future overriding the value when passed per URL.

Regards,
Eduardo

Offline

#11 2023-06-12 15:08:01

iamakimmer
Member
Registered: 2021-12-15

Re: dynamic locale

Okay thank you eduardo. Would love to help on this if needed.

My fallback plan was to create a reporting server per currency, but do you see any way to just maintain 1 set of reports (in this case birt reports) across servers, or that we'd have to maintain and update reports to each server manually?

Offline

#12 2023-06-12 15:10:19

eduardo
Administrator
Registered: 2016-11-01
Website

Re: dynamic locale

Hi iamakimmer,

you can try to use a normal parameter and use the passed value to mimic the changes necessary. So format the dates, currencies, etc with standard Java constructs.

Regards,
Eduardo

Offline

#13 2023-06-12 17:39:02

iamakimmer
Member
Registered: 2021-12-15

Re: dynamic locale

hi Eduardo,

apologies for not understanding your advice. do you mean to change all the birt reports to handle currency on the reporting side?

Offline

#14 2023-06-16 08:32:53

eduardo
Administrator
Registered: 2016-11-01
Website

Re: dynamic locale

Hi iamakimmer,

if you do not have many reports that need this functionality, you can edit them as described (add a parameter and use that parameter for formatting).

Regards,
Eduardo

Offline

#15 2023-10-20 04:25:18

iamakimmer
Member
Registered: 2021-12-15

Re: dynamic locale

Hello Eduardo - do you think RS-7505 would be prioritized in the near future?

Offline

#16 2023-10-25 19:41:04

eduardo
Administrator
Registered: 2016-11-01
Website

Re: dynamic locale

Hi iamakimmer,

unfortunately, we cannot make any statements above ticket priorities/time constraints on feature requests, as these are handled internally.

Regards,
Eduardo

Offline

Board footer

Powered by FluxBB