Home » Developer & Programmer » Forms » trigger? and call report? HELP PLS.
icon5.gif  trigger? and call report? HELP PLS. [message #109546] Fri, 25 February 2005 12:06 Go to next message
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.
icon14.gif  Re: trigger? and call report? HELP PLS. [message #109772 is a reply to message #109546] Mon, 28 February 2005 13:14 Go to previous messageGo to next message
raje_here
Messages: 14
Registered: February 2005
Junior Member

i think u r supposed to use run_product to call a form..try this link u may get some idea....

http://www.cob.fsu.edu/mis/oracle/tutorials/linking_forms_and_reports.pdf
trigger. [message #110202 is a reply to message #109546] Fri, 04 March 2005 01:46 Go to previous messageGo to next message
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
icon14.gif  Re: trigger? and call report? HELP PLS. [message #110212 is a reply to message #109546] Fri, 04 March 2005 03:25 Go to previous messageGo to next message
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 Go to previous message
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.
Previous Topic: Hierarchical tree
Next Topic: How to pass value between different block or form?
Goto Forum:
  


Current Time: Sun Nov 03 09:51:20 CST 2024