Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Set locale based on dataset value(set locale based on country value in data)
Set locale based on dataset value [message #1801643] Thu, 24 January 2019 05:34
Steve Miller is currently offline Steve MillerFriend
Messages: 3
Registered: January 2019
Junior Member
I'm developing a compensation statement in BIRT that can contain several employees within the output. There are regulations in the EU, specifically France, that require the output in the country's language and fr_FR format for numbers. The statement already does localization, however it sets the locale for all output, not by employee. If I have a mix of employees, say US and France, I need to have the report dynamically change the locale for each employee (which are grouped-by Employee ID in the dataset). Basically, I need to set the locale for each Employee ID. I have a locale value defined in the dataset (row["localeDerived"]) and a function I modified to try to use this value but it is not working:

function getTranslation() {
if(arguments.length >0 ) {
var key = arguments[0];
var l10nParams = new Array();
for(var i=1; i < arguments.length; i++)
l10nParams.push(arguments[i]);
//return reportContext.getMessage(key, reportContext.getLocale(), l10nParams)
return reportContext.getMessage(key, row["localeDerived"], l10nParams)
}
return "";
}

Is there a way I can change the locale for each row in the dataset?

[Updated on: Thu, 24 January 2019 05:39]

Report message to a moderator

Previous Topic:wrong pagination in pdf format
Next Topic:BIRT Reporting and WSDL Data Sources.
Goto Forum:
  


Current Time: Tue Mar 19 03:48:50 GMT 2024

Powered by FUDForum. Page generated in 0.02220 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top