Home > Articles > Data

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

About data source and data set event handlers

There are two kinds of data source elements and two kinds of data set elements. The data source elements are DataSource and ScriptedDataSource. The data set elements are DataSet and ScriptedDataSet. ScriptedDataSource and ScriptedDataSet elements are for non-ODA data sources. The events that BIRT fires for the ODA data sources are different from the events that it fires for non-ODA data sources.

ODA data source events

You use the ODA DataSource events, afterClose, afterOpen, beforeClose, and beforeOpen, to perform operations that are not directly related to managing the data source. There is no requirement to implement the ODA data source event handler methods.

Scripted data source events

You use the ScriptedDataSource events, open and close, to perform the actions of opening and closing the data source. You must implement the ScriptedDataSource event handlers.

ODA data set events

As with the ODA data source events, you are not required to provide event handlers for the ODA data set events. The ODA data set events include afterClose, afterOpen, beforeClose, beforeOpen, and onFetch.

Scripted data set events

You must handle the open, close, and fetch events of a ScriptedDataSet element. You use these events to open the data set, close the data set, and to fetch a data set row. In addition to the three ScriptedDataSet events for which you must provide handlers, there is one optional event, the describe event. You use the describe event handler to define dynamically generated columns.

  • + Share This
  • 🔖 Save To Your Account