Home
Analytics
how to call sys_refcursor in birt
vishwas
hi friend,
i m using procedure in my birt report.my procedure has 3 input parameter and one is out parameter. the out parameter is sys_refcursor type.
for exmple--
create or replace procedure gps_procedure(branchcode in varchar2,
fromdate in varchar2,
group1 in varchar2,
par_employee out sys_refcursor)
this procedure working fine and given me right data.
as i m using this procedure in my java application to build birt report,i have to send the parameter value through my application
in java i m set the value for input parameter for procedure as..
task.setParameterValue("branchcode",orgstrcode);
task.setParameterValue("fromdate",fromdate1);
task.setParameterValue("group",group1);
task.setParameterValue("PAR_EMPLOYEE",oracle.jdbc.OracleTypes.CURSOR);
and i set value for sys_refcursor as task.setParameterValue("PAR_EMPLOYEE",oracle.jdbc.OracleTypes.CURSOR);
but this is not working it give me error in birt report
"wrong number or types of arguments in call to 'GPS_PROCEDURE'"
thats mean sys_refcursor value wich i set is wrong.
so can any one tell me that what or how i can set value for sys_refcursor in my java code application.
thanks
Find more posts tagged with
Comments
JasonW
Is "PAR_EMPLOYEE" a report parameter or just a dataset parameter? BTW if that is an outoput parameter in dataset I suspect setting it will do nothinng.
Jason
vishwas
hi jonson,
par_employee is out parameter of type sys_refcursor i.e a cursor
for more information i m attaching my procedure.
and when i do not mention any thing in out parameter it show "wrong number or types of arguments in call"
i.e
task.setParameterValue("branchcode",orgstrcode);
task.setParameterValue("fromdate",fromdate1);
task.setParameterValue("group",group1);
i m defined only three parameter.
but i think i have to define 4th parameter of procedure that is out parameter in my application.but how ant what i dont know..
if u want i will show my application file from which i send and set the vlaue in task.
but main problem in set the value in task.my three parameter is working fine but last parameter which is out and cursor tpye is creating problem.
JasonW
Can you preview the stored proc in the birt data set editor? You also may want to have a look at this bugzilla entry:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=117166
Jason
vishwas
hi jonson,
i see the out put in birt editor by providing static value of parameter.in birt editor that was working fine and report is running but in my application i have to send the value of parameter dynamically by my application
i.e
task.setParameterValue("branchcode",orgstrcode);
task.setParameterValue("fromdate",fromdate1);
task.setParameterValue("group",group1);
now what value set for 4th parameter..?
JasonW
When you use task.setParameterValue, these correspond to report parameters, not data set parameters. Do you have your data set parameters linked to your report parameters? Can you post your design? If the 4th parameter is an out parameter you should not be able to set its value.
Jason