Previous Next

Retrieving Data : About data sets : How to use a stored procedure to retrieve data from a JDBC data source

How to use a stored procedure to retrieve data from a JDBC data source

This procedure assumes you have already created the JDBC data source that this data set uses.

1
2
On New Data Set, specify the following information:
1
In Data Set Name, type a name for the data set.
2
In Data Source, select the JDBC data source to use.
3
Choose Next.
Query displays a template for executing a stored procedure, as shown in Figure 3‑3.

Figure 3-3 Displaying stored procedures in a database

Figure 3-3
3
In Available Items, navigate to the stored procedure. Select the stored procedure, and drag it to the text area. The stored procedure name appears at the insertion point. In the text area, type the required information to execute the stored procedure. For example, you should include any arguments that are passed to the stored procedure.
To type the stored procedure, enclose the call statement in left and right braces, for example:
{call getTable('ClassicModels.Customers')}
{call getClientOrders('103')}
If you type the stored procedure without the braces, BIRT treats the statement as a regular RDBMS call, so execution depends on the RDBMS of your data source.
4
Choose Finish to save the data set. Edit Data Set displays the columns returned by the stored procedure, and provides options for editing the data set.

(c) Copyright Actuate Corporation 2008