Reputation: 617
I've created a jrxml report file. I've added the resourceBundles (pl_PL, en_GB and en_US and the default one also in english) named test.properties, test_pl_PL.properties and so on. And I have added resourceBundle="test" propertety to the tag. I've deployed the report and all related resources.
I am generating my report through rest API v2, namely:
http://localhost:9000/jasperserver/rest_v2/reports/reports/test_summary.pdf
How do I steer in which locale the report is generated? I've tried the Accept-Language in the header (through postman), also I've tried Chrome extensions and Firefox and Opera for all these clientes the report is generated in pl_PL. The only exception is edge browser in which the report is generated in english (default) locale.
Upvotes: 0
Views: 1082
Reputation: 58
Well, many years after initial question, but anyway: report itself has an embedded parameter REPORT_LOCALE
. You could set it as usual, trough URL. Example:
https://example.com/jasperserver/rest_v2/reports/folder/Invoice.pdf?REPORT_LOCALE=bg_BG&InvoiceId=2
Upvotes: 0
Reputation: 22857
Try to pass Locale via userLocale
parameter in URL. Like this:
http://localhost:9000/jasperserver/rest_v2/reports/reports/test.pdf&userLocale=pl_PL
Upvotes: 2