trigger? and call report? HELP PLS. [message #109546] |
Fri, 25 February 2005 12:06 |
oeuf
Messages: 11 Registered: August 2004
|
Junior Member |
|
|
Hi,
I need some help. I want to know the trigger on the form which will be used in the following:
1. after record is created, the user who's logged in should be saved.
2. after update the user should be saved as the one who updated the record. and the date should also be saved.
==========================================================
1. I also wanted to know how to call a report in a form.
can i call the report diplaying the record of the current customer_id?
thanks.
|
|
|
|
trigger. [message #110202 is a reply to message #109546] |
Fri, 04 March 2005 01:46 |
subba lakshmi
Messages: 36 Registered: March 2005
|
Member |
|
|
in order to store the operations perfomed by the user you need to write trigger on a table on which you want to perform the operation.The trigger is as follows:
create or replace trigger empaudit before insert or update on emp
for each row
declare
op varchar2(10);
opday date;
uname varchar2(10);
begin
select user,sysdate into uname,opday from dual;
if inserting then
op:='Inserting';
elsif updating then
op:='Updating';
else
op:='Deleting';
end if;
raise_application_error(-20001,op||' is the operation performed by '||uname||' on '||opday);
end;
for your requirement you need to modify this a bit.this is just to show how to write.
from
subba lakshmi
|
|
|
Re: trigger? and call report? HELP PLS. [message #110212 is a reply to message #109546] |
Fri, 04 March 2005 03:25 |
koala_dicky
Messages: 5 Registered: March 2005 Location: HK
|
Junior Member |
|
|
You can use Post_Insert / Post_Update to update the field in you table.
the following statement can call report :
declare
pl_id paramlist;
begin
pl_id := get_parameter_list('tempdata');
if not id_null(pl_id) then
destroy_parameter_list( pl_id );
end if;
pl_id := create_parameter_list('tempdata');
add_parameter(pl_id,'PARAMFORM',text_parameter,'NO');
add_parameter (pl_id,'p_parameter',text_parameter,'VALUE);
run_product(reports,'REPORT_NAME',synchronous,runtime,filesystem,pl_id,null);
end;
|
|
|
Re: trigger? and call report? HELP PLS. [message #110222 is a reply to message #110212] |
Fri, 04 March 2005 06:12 |
zeema
Messages: 3 Registered: March 2005 Location: Bangalore
|
Junior Member |
|
|
In case you are using oracle 9i...use run_report_object built in..and set the properties in the property pallete also start the reports server..This is done by giving a command in the command prompt..dont remember exactly wat it is...
hope it helps..
regards,
zeema.
|
|
|