Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error Creating Report from Stored Procedure

Status
Not open for further replies.

iceicebaby

Programmer
Mar 18, 2004
15
0
0
US
I am using CR 8.5 and Oracle 8 as the DB. I've used a complex Stored Procedure having cursor to create my Report but when I try to create my Report after giving valid Parameters, it gives an Error "There are No Fields in the File : TeleMgmt". Though when I run the Stored Procedure in Oracle, it shows there are rows.
Any Help is very much appreciated.
 
Thanks SynapseVampire for your reply and the valuable links. I could feel that while it's easy to create Reports based on simple Stored Procedures where an IN OUT cursor in Parameters can hold the query Results and give them back to Reports, I have a very complex query and I'm already using a cursor to hold the Results. The problem is I can't assign this cursor to the IN OUT cursor in Parameters as both these Types are different. I'm writing the code below for creating the cursor in my Procedure:
v_cursor := DBMS_SQL.OPEN_CURSOR;
DBMS_SQL.PARSE(v_cursor, cSQL_Statement, DBMS_SQL.V7);
DBMS_SQL.BIND_VARIABLE(v_cursor, ':TempBan',BanNo);
DBMS_SQL.DEFINE_COLUMN_CHAR(v_cursor, 1, v_dname, 30);
v_rows := DBMS_SQL.EXECUTE(v_cursor);
loop
if DBMS_SQL.FETCH_ROWS(v_cursor) = 0 then
exit;
end if;
DBMS_SQL.COLUMN_VALUE_CHAR(v_cursor, 1, v_dname);
DBMS_OUTPUT.PUT_LINE('Adr Attention: '||v_dname);
end loop;
Test_Cursor := v_cursor;
DBMS_SQL.CLOSE_CURSOR(v_cursor);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top