Eclipse BIRT Report Object Model (ROM)

ScriptDataSource Element

Element Overview

A specialized data source defined in JavaScript.

Details

Display Name: Script Data Source
Since: 1.0
XML Element: script-data-source
Extends: DataSource
Extendable: Yes
Abstract: No
Name Space: Data Sources
Name Requirement: Required
Allows User Properties: Yes
Has Style: No

Method Summary

close
Releases the connection to the external data source.
open
Establishes a connection to the external data source.

Inherited Properties

comments, customXml, displayName, displayNameID, eventHandlerClass, extends, name, propertyMasks, userProperties, viewAction

Inherited Methods

beforeOpen, beforeClose, afterOpen, afterClose

Description

A scripted data source is one that is defined in JavaScript. The actual implementation can also be in Java, with a JavaScript wrapper. The application is responsible for implementing two operations:

A scripted data source may use user-defined properties to define connection-specific properties. Doing so allows the developer to put the data source into a library, and use it in many reports. For example, the developer may define a SOAP data source with properties for the server name, port number and so on. The scripts associated with the data source use the ROM scripting objects to access the value of these custom properties.

See Also

ScriptDataSet element

DataSource scripting object

Method Detail

close Method

Releases the connection to the external data source.

Synopsis

None obj.close( )

Details

Since: 1.0
Context: factory
Arguments: None
Return Type: None

Description

Called when BIRT wishes to close the data source. Should release the connection to the external data source.

See Also

beforeClose method

afterClose method


open Method

Establishes a connection to the external data source.

Synopsis

None obj.open( )

Details

Since: 1.0
Context: factory
Arguments: None
Return Type: None

Description

Called by BIRT to establish a connection to the data source. Throws a JavaScript exception if the connection fails.

See Also

beforeOpen method

afterOpen method