Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Urgent!!! Web Form and Report

Urgent!!! Web Form and Report

From: Sesi Odury <SesiO_at_netinfotech.com>
Date: Mon, 17 Mar 2003 09:22:18 -0800
Message-ID: <F001.0056BC08.20030317092218@fatcity.com>


Hi All,

I would really appreciate if someone can help me.   I am calling a report from a form.
It works well on Client/Server but on the Web it takes lots of time and hangs. Unfortunately it doesn't display any errors. This is how I built the When-button-pressed code: (This is a sample test code..)

declare

	plid PARAMLIST;
	vRep_server varchar2(30);
	vRep_format varchar2(30);
	vForceRunProd varchar2(10);
	vRep varchar2(30);
	vConnect varchar2(200);
	vUrl varchar2(200);
	vParamTitle varchar2(500);
	repid report_object;
	vTomaxKey varchar2(8) := 'ToMaX123';
	rep_no number;
	p_l varchar2(200);
	v_report_id Report_Object;
	vc_report_job_id varchar2(100);
	vc_rep_status varchar2(100);
	

begin         

	if form_success then
	--	v_report_id := FIND_REPORT_OBJECT('REPORT19');
	--	SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_COMM_MODE,SYNCHRONOUS);
	--	SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_DESTYPE,CACHE);
	--	SET_REPORT_OBJECT_PROPERTY(v_REPORT_id,REPORT_DESFORMAT,'PDF');
		
		plid := get_parameter_List('testrep');
		if not id_null(plid) then
			destroy_parameter_list(plid);
		end if;
		
		plid := create_parameter_list('testrep');
		rep_no := 32;
   
   add_print_params(plid, 'P_TITLE', TEXT_PARAMETER, 'ACCOUNT REPORT');
	IF get_application_property(user_interface) = 'WEB' THEN

--tchar := b_security.encrypt('ToMaX123', visp.user_id||','||dbuser.encrypt('d3cR',visp.passwd)||','||to_char(tmxgbl.my_site));
--tmx_msg('tchar='||tchar);
--tchar := b_security.decrypt('ToMaX123',tchar);
--tmx_msg('decrypted tchar='||tchar);
add_print_params(plid, 'HHMISS', TEXT_PARAMETER, to_char(sysdate,'HH24MISS')); -- This will enforce no caching. add_print_params(plid, 'RNI',TEXT_PARAMETER, b_security.encrypt(vTomaxKey, visp.user_id||','||dbuser.encrypt('d3cR',visp.passwd)||','||to_char(tmxgbl.my_site))); add_print_params(plid, 'RNRNI',TEXT_PARAMETER, b_security.encrypt(vTomaxKey, to_char(rep_no)));
--add_print_params(plid, 'P_REPORT_NO', TEXT_PARAMETER, to_char(rep_no)); -- Removed for Security (mww 3/1/01)
--add_print_params(plid, 'P_RNET_USER_ID', TEXT_PARAMETER, visp.user_id);
--add_print_params(plid, 'P_RNET_my_site', TEXT_PARAMETER, tmxgbl.my_site);
--add_print_params(plid, 'P_RNET_passwd', TEXT_PARAMETER, visp.opaque(visp.passwd));
add_print_params(plid, 'P_USER_INTERFACE', TEXT_PARAMETER, 'WEB'); ELSE --add_print_params(plid, 'RNI',TEXT_PARAMETER, b_security.encrypt('ToMaX123', visp.user_id||','||visp.passwd||','||to_char(tmxgbl.my_site)||','||to_char(rep_no))); if rep_no > 0 then add_print_params(plid, 'P_REPORT_NO', TEXT_PARAMETER, to_char(rep_no)); end if; add_print_params(plid, 'P_RNET_USER_ID', TEXT_PARAMETER, visp.user_id); add_print_params(plid, 'P_RNET_my_site', TEXT_PARAMETER, tmxgbl.my_site); add_print_params(plid, 'P_RNET_passwd', TEXT_PARAMETER, visp.passwd); add_print_params(plid, 'P_USER_INTERFACE', TEXT_PARAMETER, 'CS'); END IF; add_parameter(plid, 'PARAMFORM', TEXT_PARAMETER, 'NO'); add_parameter(plid, 'DESTYPE', TEXT_PARAMETER, 'PREVIEW'); add_parameter(plid, 'DESFORMAT', TEXT_PARAMETER, 'PDF'); -- vForceRunProd := get_sys_env('FORCE_RUN_PRODUCT'); TOOL_env.getvar('FORCE_RUN_PRODUCT',vForceRunProd); :parameter.param_list := rtrim(:parameter.param_list, '+'); IF get_application_property(user_interface) != 'WEB' OR vForceRunProd = 'Y' THEN Run_Product(REPORTS,'testrep.rep', SYNCHRONOUS, RUNTIME, FILESYSTEM, plid, NULL); ELSE
-- IF Running on the Web read the Report Server name and the report format from the Registry
TOOL_env.getvar('WEB_REPSERVER_NAME',vRep_server); TOOL_env.getvar('FORMS60_REPFORMAT',vRep_format);
-- Read the first part of the URL from the Registry
--vUrl := get_sys_env('WEB_CGIREPORT_LOC');
TOOL_env.getvar('WEB_CGIREPORT_LOC',vUrl);
-- Format the connect string
vConnect := upper(get_application_property(username))||'/'|| --upper(get_application_property(password)); IF get_application_property(connect_string) is not null then vConnect := vConnect||'@'||upper(get_application_property(connect_string)); END IF; -- Run the report web.show_document('http://'||vUrl||'?report='||'finalrep.rep'||'+destype=CACHE+desformat='||vrep_format||'+server='||vrep_server||'+userid='||vconnect||'+'||:parameter.Param_list||'+tolerance=0'); END IF; Set_Application_Property(CURSOR_STYLE, 'DEFAULT'); clear_message; synchronize; -- update screen end if; end;

Where:
add_params( ) adds the parameter to the parameter list and includes the parameter into the :parameter.param_list field. RNI,RNRNI,RNET_USER_ID,RNET_PASSWD etc. are for security of the application since the form and report are on the web run in along with another application.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Sesi Odury
  INET: SesiO_at_netinfotech.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Mon Mar 17 2003 - 11:22:18 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US