Hi Ankush, sorry, i am using postgresql and ireport, I am new to functions as well as ireport. i will tell yu what I want to achieve, I created a function in postgresql by the name show_names(ref refcursor), here is the code ----------------------------------------------- create or replace function show_names(ref refcursor) returns refcursor as $$ begin open ref for select id,name from oba_emp; return ref; end; $$ language plpgsql; -------------------------------------------------------- now, i have to call this function in ireport - what I did to test the bare bones, In a brand new ireport, I opened the Report Query and type below: -------------------------------------------------- select show_names('you'); fetch all from you ---------------------------------------------- when I am pressing the button Read Fields it's giving the error: Multiple Resultsets returned by the query. I dont know how to handle multiple resultset in ireport. or may be I am writing the query wrong. to sum up: I have to call function's of postgresql in ireport and roaming in the dark. reg. zk