Jump to content
We've recently updated our Privacy Statement, available here ×

Make a call to Oracle Stored Procedure (PL/SQL) from iReport 3.5


vikramrao

Recommended Posts

Hi,

 

 

 

 

Make a call to Oracle Stored Procedure (PL/SQL) from iReport 3.5 (or jrxml)
and populate the results in iReport.

Key points to remember:
1. cursor name is state_cursor from the stored procedure
2. with the same name state_cursor one parameter should be declared  and
   Parameter Class --> java.sql.ResultSet in iReport,
   be sure that the 'Use as a Prompt option is not selected.
3. {call test_procedure($P{state_cursor})}
4. create STATE Field manuvally from iReport (from the procedure we are selecting STATE only)
   with the same name one field should be declared. drag and drop it in detail section
   java.lang.String -- Expression Class

create or replace
PROCEDURE TEST_PROCEDURE( state_cursor OUT SYS_REFCURSOR) AS
BEGIN
   OPEN state_cursor FOR
   SELECT STATE FROM COUNTRY_STATENAMES;
END TEST_PROCEDURE;
 

Thanks,

Vikram 

Code:
create or replacePROCEDURE TEST_PROCEDURE( state_cursor OUT SYS_REFCURSOR) ASBEGIN   OPEN state_cursor FOR   SELECT STATE FROM COUNTRY_STATENAMES;END TEST_PROCEDURE;
Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...