Jasper Reports: Accessing translated code values
In our reports we commonly have a need to display CodeValue
titles, but these are now not accessible in Jasper.
One suggestion is to implement a custom Jasper expression (see https://community.jaspersoft.com/wiki/jaspersoft-studio-expression-editor-how-extend-it-and-contribute-your-own-functions-part-2):
CODEVALUE("CODE_GROUP", field.getSomeCode(), "en")
This expression will fetch the TranslatedCodeValue
and return its title
.
The selected language to use for the template will eventually be provided by GGCE (another day, another issue).
I don't think we need to provide a .jar
for report developers, but we definitely need to have this function available in the runtime when generating reports.
Edited by Matija Obreza