Skip to main content



      Home
Home » Archived » BIRT » Oracle Stored Procedure that return Parameters of type TABLE in BIRT2.1
Oracle Stored Procedure that return Parameters of type TABLE in BIRT2.1 [message #200286] Fri, 10 November 2006 11:21 Go to next message
Eclipse UserFriend
Originally posted by: harikrishnan_j2003.yahoo.co.in

Sir,
I have one scenario for reporting,the scenario is
I take two fields from emp table, say empname,empno and check if empno = 1
then i take fields from empsalary table and display it ,else i take
fields from empdesignation table and display it.Hence for this scenario. I
have written stored procedure that return parameters of type TABLE,The
problem araises when i try to execute it BIRT2.1.1 it shows following
error.

I have also seen BUG 117166 in that they said this feature is considered
for BIRT2.1 release hence i downloaded that version and tried.



ERROR MSG:-
--------------
A BIRT exception occurred.

Plug-in Provider:Eclipse.org

Plug-in Name:BIRT Data Engine
Plug-in ID:org.eclipse.birt.data
Version:2.1.1.v20060922-1058

Error Code:odaconsumer.CannotPrepareStatement

Error Message:Failed to prepare the following query for the data set type
org.eclipse.birt.report.data.oda.jdbc.SPSelectDataSet.

Error preparing SQL statement.
SQL error #1: Non supported SQL92 token at position: 1:

{
DECLARE
pocursor refcursorexample.po_tbl;
BEGIN
refcursorexample.poproc (null, pocursor);

FOR i IN pocursor.FIRST .. pocursor.LAST
LOOP

DBMS_OUTPUT.put_line ( pocursor (i).empno
|| ' => '
|| pocursor (i).empsalary
);
END LOOP;
DBMS_OUTPUT.put_line ( 'No of Records - '||pocursor.count);
DBMS_OUTPUT.put_line ( pocursor (5).empno
|| ' => '
|| pocursor (5).empsalary
);
END;
}


Please Suggest a way to overcome this problem as i need this for my
reports desperately.


Thankyou
Harikrishnan J.
Re: Oracle Stored Procedure that return Parameters of type TABLE in BIRT2.1 [message #200898 is a reply to message #200286] Wed, 15 November 2006 01:32 Go to previous message
Eclipse UserFriend
Actually the support to this feature is in BIRT 2.2 rather than 2.1.1. So if
you download the latest nightly build of BIRT 2.2 you will find the Oracle
Store Procedure which return the Ref Cursor(The "Table" type you mentioned)
is supported.

Thanks.
Lin

"Harikrishnan" <harikrishnan_j2003@yahoo.co.in> wrote in message
news:e21fc544742f59763d1e7ae24cf6513a$1@www.eclipse.org...
> Sir,
> I have one scenario for reporting,the scenario is
> I take two fields from emp table, say empname,empno and check if empno = 1
> then i take fields from empsalary table and display it ,else i take
> fields from empdesignation table and display it.Hence for this scenario. I
> have written stored procedure that return parameters of type TABLE,The
> problem araises when i try to execute it BIRT2.1.1 it shows following
> error.
>
> I have also seen BUG 117166 in that they said this feature is considered
> for BIRT2.1 release hence i downloaded that version and tried.
>
>
>
> ERROR MSG:-
> --------------
> A BIRT exception occurred.
>
> Plug-in Provider:Eclipse.org
>
> Plug-in Name:BIRT Data Engine
> Plug-in ID:org.eclipse.birt.data
> Version:2.1.1.v20060922-1058
>
> Error Code:odaconsumer.CannotPrepareStatement
>
> Error Message:Failed to prepare the following query for the data set type
> org.eclipse.birt.report.data.oda.jdbc.SPSelectDataSet.
>
> Error preparing SQL statement.
> SQL error #1: Non supported SQL92 token at position: 1:
>
> {
> DECLARE
> pocursor refcursorexample.po_tbl;
> BEGIN
> refcursorexample.poproc (null, pocursor);
>
> FOR i IN pocursor.FIRST .. pocursor.LAST
> LOOP
>
> DBMS_OUTPUT.put_line ( pocursor (i).empno
> || ' => '
> || pocursor (i).empsalary
> );
> END LOOP;
> DBMS_OUTPUT.put_line ( 'No of Records - '||pocursor.count);
> DBMS_OUTPUT.put_line ( pocursor (5).empno
> || ' => '
> || pocursor (5).empsalary
> );
> END;
> }
>
>
> Please Suggest a way to overcome this problem as i need this for my
> reports desperately.
>
>
> Thankyou
> Harikrishnan J.
>
Previous Topic:Newbie question on Prepare error
Next Topic:self written (web) viewer - where to put libs/runtime
Goto Forum:
  


Current Time: Mon Jun 09 06:17:46 EDT 2025

Powered by FUDForum. Page generated in 0.03141 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top