Localization with SubString [message #1838564] |
Mon, 01 March 2021 14:41 |
Uwe Stieglitz Messages: 3 Registered: March 2021 |
Junior Member |
|
|
Dear All,
I am stuck with the following:
In the SQL of my report I am calling "CPNT_TITLE AS TITLE1", which is the title of training I am looking.
"CPNT_TITLE1" is localized, and when I use in BIRT expression builder the expression "reportContext.getMessage("TITLE1", reportContext.getLocale())", then everything works fine.
But now I have the requirement that the title shall be displayed not in full length in one column, but distributed over max. 4 columns of max. 30 characters.
No problem I though, I use "substring.(...)". But I do not get it working in combination with the localization.
When I am using the substring in the SQL script and the localization in the BIRT expression builder, then only 1 of the 4 fields is filled and the localization does not work (only random characters...).
When I try combining the localization and the substring in the expression builder like "reportContext.getMessage(dataSetRow["TITEL1"], reportContext.getLocale().substr(0,30))", then the HTML preview of BIRT gives me an error: "TypeError: Cannot find function substr in object de_DE. "
When I am using substring in the BIRT expression builder without localization, I still get an error: "TypeError: Cannot call method "substring" of null".
I tried then to get rid of possible NULL values by using "COALESCE" but it did neither work in SQL nor in expression builder.
Does anyone have a suggestion? I would appreciate...
Thanks Uwe
|
|
|
|
Powered by
FUDForum. Page generated in 0.03340 seconds