Home » Developer & Programmer » Reports & Discoverer » Data Insertion
Data Insertion [message #88727] Wed, 19 February 2003 09:20 Go to next message
Okondu J. Chuks
Messages: 1
Registered: February 2003
Junior Member
How can I insert data into a table from a report during runtime?
Re: Data Insertion [message #88728 is a reply to message #88727] Thu, 20 February 2003 03:55 Go to previous message
Ravi
Messages: 251
Registered: June 1998
Senior Member
Hi Okondu,

Just now i did some small excerises based on your Query..
I created a report with EMP Table and for display purpose i selected only four feilds i.e. EMPNO,ENAME,
JOB,dEPTNO.
Now in report layout inside EMPNO feild i have written one format trigger...
-------------------------------------------
function INS_EMP_DATAFormatTrigger return boolean is
begin
DECLARE EMO_NO NUMBER;
emp_no number;
begin
emp_no := :empno;
insert into emp (EMPNO,ENAME,JOB,deptno)
values(emp_no + 1,'Ravi','SWEng',20);
commit;
END;
return (TRUE);
end;
-------------------------------------------

In this format trigger i am taking empno and while insertin into table i am incrementing that empno by 1...
After generating the report you can see the emp table data..

May be this will help you....

Regards
Previous Topic: PLS Help me....Oracle Forms / Reports using OLE
Next Topic: store procedure
Goto Forum:
  


Current Time: Thu Mar 28 08:11:51 CDT 2024