Home:ALL Converter>Client-side JavaScript in Birt report library

Client-side JavaScript in Birt report library

Ask Time:2012-08-13T15:35:14         Author:Petr Mensik

Json Formatter

I am trying to solve the following problem in Birt reporting - when I display the date in Dynamic Text which is taken from the query parameters, I want to call JavaScript function which will transform this date into some user-friendly form. So I do something like

getTextDate(params["fromDate"].value)

and I have my scripts in initialize. This works fine.

But my question is, when I make a library with reusable elements and I want to employ JavaScript functions like the one above, how can I do this?initialize is not available in library template and wasn't able to find other way how to inlude JS. This article wasn't helpfull for me because I want client-side functions, not server side.

Author:Petr Mensik,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/11929949/client-side-javascript-in-birt-report-library
yy