Script 1:
var r_server = "http://192.168.100.100/reports/rwservlet?server=rep_appsrv1_asbiforms10&destype=cache&desformat";
var r_branch_code = $v("P100_BRANCH");
var r_emp_id = $v("P100_emp_NO");
var r_link = ""+r_server+"=pdf&userid=HR/HR@HR&REPORT=D:/A_REPORT/FUND_REPAYMENT_LETTER.rdf&P_BRANCH_CODE="+r_branch_code+"&P_REPAYMENT_NO="+r_emp_id+"";
window.open(r_link);
Script 2 :
var serIp = $v("P14_SERIP");
var catId = $v("P14_ITEM_CAT");
var scatId = $v("P14_ITEM_SUB_CAT");
var coaId = $v("P14_COA_TYPE");
var reportId = '&CATID='+catId+'&SCATID='+scatId+'&COAID='+coaId;
if ($v("14_RG")==1)
window.open(serIp+'COMPANY_INFO.rdf&SOMID=1');
else if ($v("14_RG")==2)
window.open(serIp+'DEPT_INFO.rdf');
else if ($v("14_RG")==3)
window.open(serIp+'DESIG_INFO.rdf');
else if ($v("14_RG")==4)
window.open(serIp+'LINE_INFO.rdf');
else if ($v("14_RG")==5)
window.open(serIp+'BLOCK_INFO.rdf');
else if ($v("14_RG")==6)
window.open(serIp+'BUYER_INFO.rdf');
else if ($v("14_RG")==7)
window.open(serIp+'SUPPLIER_INFO.rdf');
else if ($v("14_RG")==8)
window.open(serIp+'ITEM_INFO.rdf'+reportId);
else if ($v("14_RG")==9)
window.open(serIp+'CHART_OF_ACCOUNTS.rdf');
DECLARE
A VARCHAR2(100);
B VARCHAR2(100);
C VARCHAR2(200);
D VARCHAR2(200);
E NUMBER;
BEGIN
SELECT SYS_CONTEXT('USERENV','IP_ADDRESS') INTO A FROM DUAL;
SELECT SUBSTR(A,0,3) INTO B FROM DUAL;
SELECT LENGTH(A) INTO E FROM DUAL;
SELECT LIC_LOCAL_IP,LIC_REAL_IP INTO C,D FROM ISP_RUNAUTO;
IF E>6 THEN
IF B=192 THEN RETURN C; ELSE RETURN D; END IF;
ELSE
RETURN C;
END IF;
END;
0 comments:
Post a Comment