• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

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

 
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?
 
Bartender
Posts: 598
26
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.
 
I can't take it! You are too smart for me! Here is the tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Java
https://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!