Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Crystal Reports and updateable cursor
Any help would be greatly appreciated. I have a report that will look
at the codes in one table and report the number of incidents
associated with that code using a large query. I can create the cursor
to return the rows from the table but need to return a variable list
with each row of the returned set. I'm trying to read the query and
process the variable list in one stored procedure but don't see how to
update the return cursor so that the query results get inserted. If I
open the return cursor as FOR UPDATE Crystal reports gives me a fetch
error. Below is the package and the procedure I'm using. Any
suggestions would be helpful.
Thanks,
Mike
CREATE OR REPLACE PACKAGE CRYSTAL_PACKAGE AS
TYPE ReportRecCur IS REF CURSOR;
END;
CREATE OR REPLACE PROCEDURE CRYSTAL_MYPROC (ReportCur IN OUT
CRYSTAL_PACKAGE.ReportRecCur)
IS
TYPE myRecordStruct IS RECORD(
code TABLE_ONE.CODE%TYPE, decription TABLE_ONE.DESCRIPTION%TYPE, dollar_value TABLE_TWO.DOLLAR_VALUE%TYPE, time_delay TABLE_TWO.DELAY%TYPE, elite TABLE_THREE.ELITE%TYPE,
CURSOR working_cursor IS
SELECT
Fields....
FROM
Tables.......
WHERE
Condition...;
IS
BEGIN
-- able to load some default values for the two fields I need to
change
OPEN ReportCurFOR SELECT
CODE, DESCRIPTION , 0,0,0
FROM TABLE_ONE;
IF working_cursor%ISOPEN THEN
CLOSE working_cursor;
END IF;
IF myCursor%ISOPEN THEN
CLOSE myCursor;
END IF;
Received on Thu Jan 06 2000 - 19:08:15 CST
![]() |
![]() |