Home » Developer & Programmer » Forms » Error ora-305500 when getting result in excell from oracle10g forms using application server (oracle 10g)
Error ora-305500 when getting result in excell from oracle10g forms using application server [message #610534] |
Fri, 21 March 2014 01:52 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.gravatar.com/avatar/dc53f681d5af3ce270a28adb621a0818?s=64&d=mm&r=g) |
imimran83
Messages: 5 Registered: March 2014 Location: Karachi
|
Junior Member |
|
|
Error ora-305500 when getting result in excell from oracle10g forms using application server
when i am generating report in excel from oracle 10g forms using oracle application server getting following error.
Error ora-305500 when getting result in excell from oracle10g forms using application server.
please help me in this regard.
my code is below.
declare
application ole2.obj_type;
workbooks ole2.obj_type;
workbook ole2.obj_type;
worksheets ole2.obj_type;
worksheet ole2.obj_type;
cell ole2.obj_type;
args ole2.list_type;
rowcount integer;
cursor c1 is
select EMPNO,ENAME,JOB,SAL,DEPTNO
from EMP
order by EMPNO;
begin
application := ole2.create_obj('Excel.Application');
ole2.set_property(application,'Visible','True');
workbooks := ole2.get_obj_property
(application,'Workbooks');
workbook := ole2.invoke_obj(workbooks,'Add');
worksheets := ole2.get_obj_property
(workbook,'Worksheets');
worksheet := ole2.invoke_obj(worksheets,'Add');
rowcount := 0;
for rec1 in c1 loop
rowcount := rowcount + 1;
args := ole2.create_arglist;
ole2.add_arg(args,rowcount);
ole2.add_arg(args,1);
cell := ole2.get_obj_property(worksheet,'Cells',args);
ole2.destroy_arglist(args);
ole2.set_property(cell,'Value',rec1.EMPNO);
ole2.release_obj(cell);
args := ole2.create_arglist;
ole2.add_arg(args,rowcount);
ole2.add_arg(args,2);
cell := ole2.get_obj_property(worksheet,'Cells',args);
ole2.destroy_arglist(args);
ole2.set_property(cell,'Value',rec1.ENAME);
ole2.release_obj(cell);
args := ole2.create_arglist;
ole2.add_arg(args,rowcount);
ole2.add_arg(args,3);
cell := ole2.get_obj_property(worksheet,'Cells',args);
ole2.destroy_arglist(args);
ole2.set_property(cell,'Value',rec1.JOB);
ole2.release_obj(cell);
args := ole2.create_arglist;
ole2.add_arg(args,rowcount);
ole2.add_arg(args,4);
cell := ole2.get_obj_property(worksheet,'Cells',args);
ole2.destroy_arglist(args);
ole2.set_property(cell,'Value',rec1.SAL);
ole2.release_obj(cell);
args := ole2.create_arglist;
ole2.add_arg(args,rowcount);
ole2.add_arg(args,5);
cell := ole2.get_obj_property(worksheet,'Cells',args);
ole2.destroy_arglist(args);
ole2.set_property(cell,'Value',rec1.DEPTNO);
ole2.release_obj(cell);
end loop;
ole2.release_obj(worksheet);
ole2.release_obj(worksheets);
ole2.release_obj(workbook);
ole2.release_obj(workbooks);
ole2.release_obj(application);
end;
|
|
|
|
|
Goto Forum:
Current Time: Tue Sep 03 21:46:24 CDT 2024
|