![]() ![]() |
The ScriptDataSource element is a specialized data source defined in JavaScript. The actual implementation of the data source can be in Java, using a JavaScript wrapper.
The application is responsible for implementing two operations:
A scripted data source can use user-defined properties to define connection-specific properties. Doing so allows the developer to put the data source into a library, for use with other reports. For example, the developer may define a SOAP data source with properties for the server name, and port number. The scripts associated with the data source use the ROM scripting objects to access the value of these custom properties.
DesignElement->ReportElement->DataSource
None
comments, customXml, extends, name, userProperties
None
beforeOpen, beforeClose, onFetch, afterOpen, afterClose
The following sections describe the methods of the ScriptDataSource element
A script that executes when the data set associated with the data source completes. Use the close method to release the connection to the external data source.
A script that executes when BIRT opens a data source. Use the open method to establish a connection to the external data source. The open method throws a JavaScript exception if the connection fails.
![]() ![]() |