August 7, 2013

How to create a report using oracle stored procedure?

1-Select New Data Provider-->Stored Procedure
2-Select or define the db connection
3-Choose the stored procedure
4-Specify stored procedure as the data source
5-Define parameters


Use REF CURSOR with IN/OUT parameter.
Sys_Refcursor is a cursor variable that points to any cursor,
mainly used for returning the CURSOR OUTPUT.

Eg:
CREATE OR REPLACE PROCEDURE BO_proc(proc_cur IN OUT
sys_refcursor)
AS
BEGIN
OPEN proc_cur FOR SELECT * FROM EMP;
END;

/
/