Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to make a call to oracle stored procedures from ireport designer

 
Madhusudan Daad
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have written following stored procedure to test procedure call from iReport designer.

Stored Procedure:

CREATE OR REPLACE PROCEDURE test(cursor1 out sys_refcursor) IS
BEGIN
OPEN cursor1 for
select person_id,first_name
from person
where rownum < 5;
END;



In my query window I am using following line to call this procedure.

{call test($P{cursor})}


where $P{cursor} is a parameter with class java.sql.ResultSet.

I have added ojdbc.jar file into my class path and connection is also successful.

When I run above statement for calling stored procedure it throws the error:

Error: java.sql.SqlException:Invalid column type


Can someone tell me what I did wrong here? AM i supposed to add any file or make any changes in the call to stored procedure?
 
Brian Tkatch
Bartender
Posts: 567
25
Linux Notepad Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Checking against the sample code, it looks fine.

You probably want to ask this in the Jaspersoft forums. Hmm... it looks like you did already. Regardless, this is a question Jasper ought to be able to answer.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic