Skip to main content

Oracle Stored Procedures

Version: 9.0

Oracle Stored Procedure

When using a Stored Procedure with the Provider Type of 'Oracle' there are two items to pay attention to: refCursor and Reference Parameter. Both the Reference Parameter and a parameter of type refCursor must be defined for each Stored Procedure of type 'Oracle'.

A parameter of type refCursor is used for getting the pointer to a specific record set. At least one parameter of type refCursor must be defined.

The Reference Parameter field specifies which of the refCursor parameters (or record set) to be used for the scope of the report when multiple refCursors are defined.

Figure 1 - Query Editor Window for an Oracle Stored Procedure

Reference Query​

A reference query can be specified by selecting "Reference" from the Query Editor drop down box. A reference query allows a refCursor (record set) from a Document's Oracle Stored Procedure to be used on a Report or Fixed Page within that Document. This is useful when the Document level Oracle Stored Procedure has multiple refCursors. The Reference Query is similar to specifying the Reference Parameter in the Stored Procedure in that it indicates which refCursor (record set) to use. 

Figure 2 - Query Editor Window for Reference Query

Specifying Stored Procedure Parameters​

Parameters from within an Oracle Stored Procedure can be displayed in the PDF using the following syntax:

     SPParameters["query_ID.parameter_name"]

Note: Odbc, Oledb and MS SQL do not support output parameters and therefore the above syntax cannot be used for these provider types.