Contoh 1   simple

 

DECLARE

  repid REPORT_OBJECT;

  v_desformat VARCHAR2(50);

  v_rdf VARCHAR2(50);

  v_userid VARCHAR2(50);

  v_parameter VARCHAR2(100);

BEGIN

            

            v_desformat := 'desformat=';

 

  repid := FIND_REPORT_OBJECT('COBAREP');

  

  v_rdf := 'report='||GET_REPORT_OBJECT_PROPERTY(repid,REPORT_FILENAME);

  v_userid := 'userid='||GET_CONNECT_INFO();

 

 
Web.show_document('/reports/rwservlet?'||v_rdf||'&destype=cache&'||v_des
format||'&'||v_userid,'_blank');

 

  EXCEPTION

     WHEN OTHERS THEN

          MESSAGE('Error ' || ERROR_TEXT);

          RAISE FORM_TRIGGER_FAILURE;

END;

 

 

 

 

Contoh 2

 

Buat procedure

 

PROCEDURE WEB_PRINT (ekst varchar2, format varchar2) IS

 pl_id ParamList; 

 pl_name VARCHAR2(30) := 'report_param_list'; 

 v_temp varchar2(200);

 repid REPORT_OBJECT;

 nama_file varchar2(80) := exim_reporth_path(user||'.'||ekst) ;

 ret_val      varchar2(100);

  v_jobID   varchar2(100);

  rep_status  varchar2(100);

  v_report_name varchar2(200);

 

v_conn_str  varchar2(50) := 'onta/[EMAIL PROTECTED]';

 v_rep2excel_path varchar2(100) :=
'D:\oracle\product\OAS\Apache\fastcgi\rep2excel.exe';

v_cache_path varchar2(100) :='D:\oracle\product\OAS\reports\cache'; 

v_cmd_rwrun   varchar2(300);

v_cmd_rep2excel   varchar2(300);

v_input_path varchar2(300) ;

v_output_path varchar2(300) ;

            

Begin

-- if msg('Anda Ingin Mencetak Laporan ini?','Cetak Laporan') <>
ALERT_PRINT then

--  return;

-- end if;

 

v_report_name := 'COBAREP';

 

 pl_id := Get_Parameter_List(pl_name); 

 IF Not Id_Null(pl_id) THEN

  destroy_parameter_list(pl_name);

 end if;

 

 pl_id := Create_Parameter_List(pl_name); 

 IF Id_Null(pl_id) THEN 

   Message('Error creating parameter list '||pl_name); 

   RAISE Form_Trigger_Failure; 

 END IF;

   

 Add_Parameter(pl_id, 'destype',TEXT_PARAMETER, 'cache');

 Add_Parameter(pl_id, 'desformat',TEXT_PARAMETER, format);

 
--add_parameter(pl_id,'p_from_date',text_parameter,:dlinv0403m.from_date
);

 add_parameter(pl_id,'p_to_date',text_parameter,:block3.to_date);

 
--add_parameter(pl_id,'user_name',text_parameter,:global.Requestor_name)
; 

 --add_parameter(pl_id,'desname',text_parameter,nama_file);

 :global.rep_server :=get_report_server;--
'rep_pool-11189';--'rep_laurence-00326';

  set_report_object_property(v_report_name,REPORT_SERVER,
:global.rep_server);     

  

                        ret_val :=
run_report_object(v_report_name,pl_id);

                          v_jobID :=
substr(ret_val,length(:global.rep_server)+2,length(ret_val));

                        

                        if ret_val is not null and v_jobID <> '0' then 

                        rep_status := report_object_status(ret_val);

                               WHILE rep_status in ('RUNNING',
'OPENING_REPORT','ENQUEUED') LOOP

                                 rep_status :=
report_object_status(ret_val);

                               END LOOP;

                        

                         IF rep_status = 'FINISHED' THEN

 
--web.show_document('http://ade-hms12321:7778/reports/rwservlet/getjobid
'||

                          -- v_jobID||'?server='||'rep_ ade-hms12321');

 
web.show_document(get_web_server||v_jobID||'?server='||:global.rep_serve
r);

                          else

                          message('Report : ' || rep_status);

                          end if;

                        else

                        msg('Error When Running Report');   

                        end if;

                                                            

 v_input_path:=get_web_server||v_jobID||'?server='||:global.rep_server;


 --v_output_path:=get_web_server||v_jobID||'.xls';

 v_output_path:=v_cache_path||'\coba.xls';

 v_cmd_rep2excel:='cmd /c start '||v_rep2excel_path||'
-i:'||v_input_path ||' -o:'||v_output_path ||' -open' ;

 --:cmd2 := v_cmd_rep2excel;

-- HOST(v_cmd_rep2excel);

 Destroy_Parameter_List(pl_id);

 

End ;

 

 

Cara manggil contoh 2

Di event when button pressed

 

WEB_PRINT('HTML','HTML');  -- untuk format HTML

 

WEB_PRINT('PDF','PDF');  -- untuk format HTML

 

 

 

 

  _____  

From: [email protected] [mailto:[EMAIL PROTECTED]
On Behalf Of Tari N'dut
Sent: Tuesday, January 23, 2007 10:25 AM
To: [email protected]
Subject: Re: [indo-oracle] call repexpert from oracle form

 

Dear All,

Pertanyaan yang lebih spesifik, bagaimana caranya call Repexpert use
web.show_document ??

Mohon bantuannya ya ...

Terima kasih.

Tari N'dut <[EMAIL PROTECTED] <mailto:tari_triuntari%40yahoo.com>
> wrote:
Dear All,

Bagaimana caranya memanggil RepExpert dari Oracle form ?

Mohon bantuannya...

Terima kasih.

Tari.

---------------------------------
Need a quick answer? Get one in minutes from people who know. Ask your
question on Yahoo! Answers.

[Non-text portions of this message have been removed]

---------------------------------
Don't be flakey. Get Yahoo! Mail for Mobile and 
always stay connected to friends.

[Non-text portions of this message have been removed]

 



The information contained in this email is or may be confidential, legally 
privileged, and proprietary in nature or otherwise protected by law from 
disclosure and is intended solely for the use of the addressee. If you are not 
the intended recipient, you are hereby notified that any disclosure, 
dissemination, distribution, copying or use of any part of this mail is 
strictly prohibited and unlawful. If you received this email in error, please 
immediately notify the sender or our email administrator at [EMAIL PROTECTED] 
and delete it from your system. Thank you.

[Non-text portions of this message have been removed]

Kirim email ke