Localize java.util.Collection, str( $P{paramCollection} )

Hey there !

Does anybody know how to localize a collection ?

I have a report with a multy-select-query assigned to it. I want to translate the selection / collection, but 

str( $P{paramCollection} ) does not work and resolves to an error:

"Error evaluating expression : Source text : $P{ParamAlarmtype} ? str( $P{ParamAlarmtype} ) : $R{Any alarmtype}

Any help appreciated !

EDIT:

For example.  $P{ParamAlarmtype} prints to [General, Safety, Transport, Message] , and i want it to be translated to (e.g. german)  [Allgemein, Sicherheit, Transport, Meldung] 

 

 

marc_hueskens's picture
Joined: Jan 30 2012 - 2:11am
Last seen: 1 month 5 days ago
Maybe i should not have copied the whole expression... I just want to translate $P{ParamAlarmtype} $R{ $P{ParamAlarmtype} }does not work. str ( ${ParamAlarmtype} ) does not work. $P{ParamAlarmtype} e.g. prints [Safety, General, Transport] or [] or [Safety] or ... Hope this helps.
marc_hueskens - 10 years 10 months ago

1 Answer:

$P{ParamAlarmtype} ? str( $P{ParamAlarmtype} ) : $R{Any alarmtype}

In your above expression provide value for $P{ParamAlarmtype}

e.g

$P{ParamAlarmtype} == "ABC" ? str( $P{ParamAlarmtype} ) : $R{Any alarmtype} 

ajinkya_c's picture
7263
Joined: Aug 29 2012 - 6:13am
Last seen: 6 years 6 months ago

Sry. I think you misunderstood me.
See my comment in the first post.

marc_hueskens - 10 years 10 months ago
Feedback