PROCEDURE run_report (p_rpt_name VARCHAR2, p_dest VARCHAR2 DEFAULT 'C') IS
v_url VARCHAR2 (500);
v_cur_form_name VARCHAR2 (100);
v_length NUMBER (2);
vpath_sep CHAR (1);
-- Stored Reports path where reports are available.
v_rpt_name_with_path VARCHAR2 (2000);
v_rpt_title VARCHAR2 (300) := 'Test Purpose';
v_doc_no VARCHAR2 (50);
v_rpt_format VARCHAR2 (50) := 'pdf';
-- Report run on 'PDF' format...
v_rpt_key VARCHAR2 (50) := 'stelar';
-- Report Key form feport configure 'CGICMD.DAT' file.
v_para_form VARCHAR2 (3) := 'Yes';
-- Show Report Paraform or Not....
v_dest VARCHAR2 (20);
v_rpt_builder VARCHAR2 (200) := 'rdf';
-- Report Format such as '*.RDF','*.REP' etc..
v_rpt VARCHAR2 (20); -- Object code of the calling report
-------------------------------------------------------------
p0 VARCHAR2 (3) := :crq3.company_code;
p19 VARCHAR2 (200) := :GLOBAL.cagrpcde;
p20 VARCHAR2 (200) := SUBSTR (:crq3.company_name, 7);
p21 VARCHAR2 (100) := :crq3.s_usercd;
p22 VARCHAR2 (200) := :crq4.progname;
p25 VARCHAR2 (200) := :crq4.progdesc;
p26 VARCHAR2 (200) := :GLOBAL.numbsyst;
---------------------------------------------------
BEGIN
---------------------------------- Report_Path ----------------------------------
v_cur_form_name := GET_APPLICATION_PROPERTY (current_form);
IF GET_APPLICATION_PROPERTY (operating_system) IN
('MSWINDOWS', 'MSWINDOWS32', 'WIN32COMMON') THEN
vpath_sep := '\';
ELSE
vpath_sep := '/';
END IF;
v_length := INSTR (v_cur_form_name, vpath_sep, -1);
v_rpt_name_with_path := 'E:\important\mywork\' || p_rpt_name;
--v_rpt_name_with_path:='Q:\ORBBAS\st\bin\'||p_rpt_name;
------------------------------------ Call Report ---------------------------------------
v_dest := UPPER (p_dest);
IF v_dest = 'C' THEN
v_dest := 'cache';
ELSIF v_dest = 'P' THEN
v_dest := 'printer';
ELSIF v_dest = 'M' THEN
v_dest := 'mail';
ELSIF v_dest = 'F' THEN
v_dest := 'file';
END IF;
v_url :=
'/reports/rwservlet?'
|| v_rpt_key
|| '¶mform='
|| v_para_form
|| '&desformat='
|| v_rpt_format
|| '&destype='
|| v_dest
|| '&report='
|| v_rpt_name_with_path
|| '&p_rpt_title='
|| v_rpt_title
|| '&p_builder='
|| v_rpt_builder
|| '&p0='
|| p0
|| '&p19='
|| p19
|| '&p20='
|| p20
|| '&p21='
|| p21
|| '&p22='
|| p22
|| '&p25='
|| p25
|| '&p26='
|| p26;
web.show_document (v_url, '_blank');
END;
Halim, a Georgia Tech graduate Senior Database Engineer/Data Architect based in Atlanta, USA, is an Oracle OCP DBA and Developer, Certified Cloud Architect Professional, and OCI Autonomous Database Specialist. With extensive expertise in database design, configuration, tuning, capacity planning, RAC, DG, scripting, Python, APEX, and PL/SQL, he combines technical mastery with a passion for innovation. Notably, Halim secured 16th place worldwide in PL/SQL Challenge Cup Playoff on the year 2010.
Friday, September 11, 2009
Subscribe to:
Post Comments (Atom)
My Blog List
-
-
-
ASSM states3 weeks ago
-
UKOUG Discover 20241 month ago
-
-
-
-
-
-
-
-
Moving Sideways8 years ago
-
-
Upcoming Events...11 years ago
-
No comments:
Post a Comment