Previous TopicNext Topic


ScriptDataSource

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.

Extends

DesignElement->ReportElement->DataSource

Property summary

None

Inherited properties

comments, customXml, extends, name, userProperties

Slot summary

None

Method summary

Inherited methods

beforeOpen, beforeClose, onFetch, afterOpen, afterClose

ScriptDataSource methods

The following sections describe the methods of the ScriptDataSource element

close

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.

open

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.


(c) Copyright Actuate Corporation 2006

Previous TopicNext Topic