> #### 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 | In Data Explorer, right-click Data Sets, then choose New Data Set.

> 2 | On New Data Set, specify the following information:

> 1 | In Data Source Selection, select the JDBC data source to use.

> 2 | In Data Set Type, select SQL Stored Procedure Query.

> 3 | In Data Set Name, type a name for the data set. Choose Next.

> Query displays a template for executing a stored procedure, as shown in 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. Type the arguments if the stored procedure uses parameters. Figure 3-3 shows a stored procedure selected in Available Items. The stored procedure has three parameters. The text area displays the call statement to run the stored procedure.

> Figure 3‑3 | Displaying stored procedures in a database

> 4 | Choose Finish to save the data set.

(c) Copyright Actuate Corporation 2009