Due to the unique nature of EnterpriseDB stored procedures, you cannot add them directly into a JReport catalog. In this sense, the usage of JReport Designer is limited when you use an EnterpriseDB database. As a substitute, JReport has developed the user data source API which can use stored procedures in EnterpriseDB. The usage of EnterpriseDB stored procedures is the same as that of Oracle stored procedures, except that the class name for EnterpriseDB stored procedures is EnterpriseDbProcedureUDS, in the package jet.datasource.enterprisedb.
Suppose that the EnterpriseDB stored procedure is defined as follows:
create or replace package shdemo as type curtype is ref cursor; end shdemo; create or replace procedure empquery (param1 in varchar2, |
To add the stored procedure into a JReport catalog, follow the steps below:
DRIVER=com.edb.Driver&URL="jdbc:edb://222.222.222.45:5444/edb"&USER=enterprisedb&PSWD=db1234&OWNER=enterprisedb&PROCNAME=empquery&SQL={call empquery(?,?)}&REFCURSORINDEX=2&PARAMVALUE=@job1
DRIVER=com.edb.Driver&URL="jdbc:edb://222.222.222.45:5444/edb"&USER=enterprisedb&PSWD=db1234&OWNER=enterprisedb&PROCNAME=empquery&SQL={call empquery(?,?)}&REFCURSORINDEX=2&INPARAMVALUE=@job1,varchar,1
OWNER=enterprisedb&PROCNAME=empquery&SQL={call empquery(?,?)}&REFCURSORINDEX=2&PARAMVALUE=@job1