|
Re: localize dataset value [message #813942 is a reply to message #813219] |
Mon, 05 March 2012 21:43 |
|
You could always add a computed column to the dataset that has an
expression similar to:
reportContext.getMessage(row["YOURCOLUMNNAME"]);
As long as the value of YOURCOLUMNAME is in a resource file associated
with the report it should convert it for you.
Jason
On 3/4/2012 8:34 PM, Anthony Farrell wrote:
> I have a urgent question ,e.g.
>
> If the sudo SQL in the data set was something like (i.e. it generated
> derived data)
>
> select case (age > 55 then 'Old' else 'young') from person
>
> I would need to localise the values 'old ' and 'young', how would we do
> this ?
>
> I would like to use the same property files used to localize the report
> title, chart xaxis title ...etc
> Is it possible to some-how map the sql data values that comes back from
> a column in a SQL query to a property name in a localized text file ?
>
> Can I create a map or rule of some kind to "'old' maps to key
> "report.age.old=Old"
>
>
> Many thanks.
> Anthony.
|
|
|
Re: localize dataset value [message #813978 is a reply to message #813942] |
Mon, 05 March 2012 22:42 |
|
You can also use that same code in an oncreate of the data element like:
this.setDisplayValue(reportContext.getMessage(this.getValue());
Jason
On 3/5/2012 4:43 PM, Jason Weathersby wrote:
> You could always add a computed column to the dataset that has an
> expression similar to:
>
> reportContext.getMessage(row["YOURCOLUMNNAME"]);
>
> As long as the value of YOURCOLUMNAME is in a resource file associated
> with the report it should convert it for you.
>
> Jason
>
> On 3/4/2012 8:34 PM, Anthony Farrell wrote:
>> I have a urgent question ,e.g.
>>
>> If the sudo SQL in the data set was something like (i.e. it generated
>> derived data)
>>
>> select case (age > 55 then 'Old' else 'young') from person
>>
>> I would need to localise the values 'old ' and 'young', how would we do
>> this ?
>>
>> I would like to use the same property files used to localize the report
>> title, chart xaxis title ...etc
>> Is it possible to some-how map the sql data values that comes back from
>> a column in a SQL query to a property name in a localized text file ?
>>
>> Can I create a map or rule of some kind to "'old' maps to key
>> "report.age.old=Old"
>>
>>
>> Many thanks.
>> Anthony.
>
|
|
|
|
Re: localize dataset value [message #815482 is a reply to message #814747] |
Wed, 07 March 2012 18:16 |
|
That is correct.
Jason
On 3/6/2012 4:04 PM, Anthony Farrell wrote:
> Many thanks for your prompt reply, we will go with the computed column
> approach :
>
> reportContext.getMessage(row["CASESTATUS"]);
>
> All you need are property values for each CASESTATUS value,e.g. if there
> were only 2 case status then the property file would only need open=Open
> Status
> close=Close Status
>
> with a property localised to French containing:
> open=Open in french
> closed=close in french.
|
|
|
Powered by
FUDForum. Page generated in 0.03683 seconds