Previous TopicNext Topic


How to specify a stored procedure for a JDBC data set

  1. Create a new data set on a data source that contains a stored procedure.
  2. Specify the properties of the data set:
    1. In Data Set Name, specify a name for the data set.
    2. In Data Source, use the drop-down list to choose a data source to use for this data set.
    3. In Data Set Type, select SQL Stored Procedure Query, as shown in Figure 3-7.
    4. Figure 3-7 Creating a stored procedure

      Figure 3-7 Creating a stored procedure
    Choose Next. Query displays a template stored procedure, as shown in Figure 3-8.

    Figure 3-8 Displaying stored procedures in a database

    Figure 3-8 Displaying stored procedures in a database
  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.
  4. 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 is dependent on the RDBMS of your data source.
  5. 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 2006

Previous TopicNext Topic