Create CMDKey:
Step -1:go to :
C:\DevSuiteHome_1\reports\conf\rwservlet.properties
change :
SERVER_IN_PROCESS=YES
RELOAD_KEYMAP=YES
Step -2:
Go to :
C:\DevSuiteHome_1\reports\conf\cgicmd.dat
Add this line at the bottom:
lierp: Userid=U00001/U@RPRT%*
where :
CMDKEYNAME = lierp
UserID = U00001
Password = U
Connect String = RPRT
CREATE TABLE REPPARA
(
ID NUMBER(10),
IP VARCHAR2(30),
PORT VARCHAR2(30),
URL VARCHAR2(30),
CMDKEY VARCHAR2(30),
DESFORMAT VARCHAR2(30),
DESTYPE VARCHAR2(30)
);
ALTER TABLE REPPARA ADD CONSTRAINT PK_REPPARA_ID PRIMARY KEY (ID);
INSERT INTO REPPARA VALUES (1,'192.168.1.30','8889','/reports/rwservlet','lierp','pdf','cache');
INSERT INTO REPPARA VALUES (2,'192.168.1.30','8889','/reports/rwservlet','lierp','htmlcss','cache');
INSERT INTO REPPARA VALUES (3,'192.168.1.30','8889','/reports/rwservlet','lierp','spreadsheet','cache');
grant select on reppara to roprtr;
AFTER ANALYSYS (Must Run in Forms):
FUNCTION F_PRINT_PARA
(
vid number,
vPath varchar2,
vReportNM varchar2,
vParamForm varchar2
)
RETURN VARCHAR2
IS
rep_url varchar2(2000);
vIP VARCHAR2(30);
vPORT VARCHAR2(30);
vURL VARCHAR2(30);
vCMDKEY VARCHAR2(30);
vDESFORMAT VARCHAR2(30);
vDESTYPE VARCHAR2(30);
cursor c_reppara is
select IP,PORT,URL,CMDKEY,DESFORMAT,DESTYPE
from lierp.reppara
where id=vid;
r_reppara c_reppara%rowtype;
BEGIN
open c_reppara;
fetch c_reppara into vip,vport,vurl,vcmdkey,vdesformat,vdestype;
close c_reppara;
IF VIP IS NOT NULL THEN
rep_url:='http://'||VIP||':'||VPORT||VURL||'?cmdkey='||VCMDKEY
||'&report='||VPATH||VREPORTNM
||'&desformat='||VDESFORMAT||'&destype='||VDESTYPE||'¶mform='||VPARAMFORM;
ELSE
rep_url:='';
END IF;
RETURN REP_URL;
END;
/
PARAMETER LESS REPORT :
DECLARE
rep_url varchar2(2000);
vDB varchar2(10);
BEGIN
rep_url:=f_print_para(:GLOBAL.PRINTID,:global.path,'PROJECT_LIST.rep','no');
WEB.SHOW_DOCUMENT(rep_url,'_blank');
END;
call report with parameter FROM WEB.
DECLARE
rep_url varchar2(2000);
vDB varchar2(10);
BEGIN
rep_url:=f_print_para(:GLOBAL.PRINTID,:global.path,'rate.rep','yes');
WEB.SHOW_DOCUMENT(rep_url,'_blank');
END;
call report with parameter from FORM:
DECLARE
rep_url varchar2(2000);
vDB varchar2(10);
BEGIN
rep_url:=f_print_para(:GLOBAL.PRINTID,:global.path,'rate.rep','no')
||'&p_plan='||:plan
||'&p_term='||:term;
WEB.SHOW_DOCUMENT(rep_url,'_blank');
END;
Tags:
Oracle Developer