Tuesday, July 10, 2007

Jasper Text Field Expression

How to do Text Field Expression in Jasper when I have more than one condition checking to output the textField?
Example...
I might have applicationResour
ceKey "key1","key2","key3", and i need to display it as "keyValue1","keyValue2","keyValue3"















Code

($F{key}).equals("key1") ?
"
keyValue1" :
($F{key}).equals("
key2")?
"
keyValue2":
($F{key}).equals("
key3")?
"
keyValue3":
"-"



1 comment:

SD said...

interesting : )

Anyway you could use the resource bundle tag >> $R{}

when the case is too simple

God bless you,

SD!!