Previous Next


Calling external JavaScript functions

In addition to executing JavaScript within a report, BIRT provides the option to use external JavaScript files located in the resource folder. Use the resources View and the property editor to associate these files with the selected report. For example, an external JavaScript file has the following content:

function getMyValue( ){
return "This is a test of the add js button";
}

If this file is located in the resource folder, a report developer can select the resources tab of the property editor and add the JavaScript file to the report. The JavaScript file is not imported, but is referenced in the report. After making this association, the developer can call getMyValue( ) in any BIRT expression or any of the event handler scripts.



(c) Copyright Actuate Corporation 2012