Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remote Scripting Error: Page invoke does not support remote scripting

Status
Not open for further replies.

PeasNCarrots

Programmer
Jun 22, 2004
73
US
<html>
<head>
<title>Time in Transit Analyser</title>

<script>
var g_qry = "";

var Template_Modified = document.lastModified
var Template_District = "ner"
var Template_Department = "district"
var Template_Level = 2

// Enter your name within the quotes below
Author_Name = "Patrick Ryan"

// Enter your UPS e-mail address within the quotes below
Author_Email = "zdd1per@ups.com"

</script>
<script SRC="</script>

<!-- Place your content below here -->
</head>
>
<body >
<SCRIPT Language="JavaScript" src="../_ScriptLibrary/rs.htm"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
RSEnableRemoteScripting("../_ScriptLibrary")
</SCRIPT

<h2>Time in Transit Analyser (<%if strPerspective = "ODA" then
response.Write "Origin)"
else
response.Write "Destination)"
end if%></h2>
<h3>Please enter the following information: </h3>
<form name=frm action="x_ttr_Analysis.asp?Weekendingdate=<%=dWeek%>&Perspective=<%=strPerspective%>&District=<%=dd%>" method="post" ID=Form1>
<table width="100%" id=TABLE1>

<tr bgcolor=silver>
<td colspan=6><b>&nbsp;Origin Information</b></td>
</tr>
<tr>
<td width="20%" colspan="" rowspan="">PU Alpha:</td>
<td width="17%" colspan="" rowspan=""><select name=combo style="width: 75;word-wrap: break-word;" onchange="filterVal(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=dWeek%>');" onclick="if(this.length==1){getData(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=sID%>', '<%=sPass%>', '<%=dWeek%>');}" ID=PU_Alpha><option value="*" selected>All</option></select></td>
<td width="17%" colspan="" rowspan="">PU Slic:</td>
<td><select name=combo style="width: 75;word-wrap: break-word;" onchange="filterVal(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=dWeek%>');" onclick="if(this.length==1){getData(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=sID%>', '<%=sPass%>', '<%=dWeek%>');}" id=PU_SLIC><option value="*" selected>All</option></select></td>
<%if strPerspective = "DDA" then 'view the Destination interface%>
<td >PU State:</td>
<td ><select name=combo style="width: 75;word-wrap: break-word;" onchange="filterVal(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=dWeek%>');" onclick="if(this.length==1){getData(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=sID%>', '<%=sPass%>', '<%=dWeek%>');}" ID=PU_State><option value="*" selected>All</option></select></td>
<%end if%>
</tr>
<%if strPerspective = "ODA" then 'view the origin interface%>
<tr>
<td >PU Date:</td>
<td ><select name=combo style="width: 100;word-wrap: break-word;" onchange="filterVal(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=dWeek%>');" onclick="if(this.length==1){getData(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=sID%>', '<%=sPass%>', '<%=dWeek%>');}" ID=PU_DT><option value="*" selected>All</option></select></td>
<td >PU Time:</td>
<td colspan=2><select name=combo style="width: 100;word-wrap: break-word;" onchange="filterVal(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=dWeek%>');" onclick="if(this.length==1){getData(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=sID%>', '<%=sPass%>', '<%=dWeek%>');}" ID=PU_TM><option value="*" selected>All</option></select></td>
</tr>
<%end if%>
<tr bgcolor=silver>
<td colspan=6><b>&nbsp;Package Information</b></td>
</tr>
<tr>
<td>Tracking Number:</td>
<td colspan=2><select name=combo style="width: 175;word-wrap: break-word;" onchange="filterVal(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=dWeek%>');" onclick="if(this.length==1){getData(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=sID%>', '<%=sPass%>', '<%=dWeek%>');}" ID=TRK_NR><option value="*" selected>All</option></select></td>
<td align=right>Service code:&nbsp;&nbsp;&nbsp;</td>
<td colspan=2><select name=combo style="width: 75;word-wrap: break-word;" onchange="filterVal(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=dWeek%>');" onclick="if(this.length==1){getData(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=sID%>', '<%=sPass%>', '<%=dWeek%>');}" ID=SVC_CD><option value="*" selected>All</option></select></td>
</tr>
<tr bgcolor=silver>
<td colspan=6><b>&nbsp;Account Information</b></td>
</tr>
<tr>
<td>Account Number:</td>
<td><select name=combo style="width: 100;word-wrap: break-word;" onchange="filterVal(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=dWeek%>');" onclick="if(this.length==1){getData(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=sID%>', '<%=sPass%>', '<%=dWeek%>');}" ID=AC_NR><option value="*" selected>All</option></select></td>
<td>Account Name:</td>
<td <%if strPerspective = "DDA" then %> colspan=3 <%end if%>><select name=combo style="width: <%if strPerspective = "DDA" then%>275<%else%>200<%end if%>;word-wrap: break-word;" onchange="filterVal(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=dWeek%>');" onclick="if(this.length==1){getData(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=sID%>', '<%=sPass%>', '<%=dWeek%>');}" ID=AC_NA><option value="*" selected>All</option></select></td>
<%if strPerspective = "ODA" then 'view the Origin interface%>
<td>Account Slic:</td>
<td ><select name=combo style="width: 75;word-wrap: break-word;" onchange="filterVal(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=dWeek%>');" onclick="if(this.length==1){getData(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=sID%>', '<%=sPass%>', '<%=dWeek%>');}" ID=AC_SLIC><option value="*" selected>All</option></select></td>
<%end if%>
</tr>
<tr bgcolor=silver>
<td colspan=6><b>&nbsp;Exception Information</b></td>
</tr>
<%if strPerspective = "DDA" then 'view the Destination interface%>
<tr>
<td>Exception Alpha:</td>
<td><select name=combo style="width: 75;word-wrap: break-word;" onchange="filterVal(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=dWeek%>');" onclick="if(this.length==1){getData(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=sID%>', '<%=sPass%>', '<%=dWeek%>');}" ID=EXP_Alpha><option value="*" selected>All</option></select></td>
<td>Exception Slic:</td>
<td ><select name=combo style="width: 75;word-wrap: break-word;" onchange="filterVal(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=dWeek%>');" onclick="if(this.length==1){getData(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=sID%>', '<%=sPass%>', '<%=dWeek%>');}" ID=EXP_SLIC><option value="*" selected>All</option></select></td>

<!--<tr>-->
<td>Exception Code:</td>
<td><select name=combo style="width: 75;word-wrap: break-word;" onchange="filterVal(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=dWeek%>');" onclick="if(this.length==1){getData(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=sID%>', '<%=sPass%>', '<%=dWeek%>');}" ID=EXP_CD><option value="*" selected>All</option></select>
<input name=btnLookUp title="Look up the description of the exception code" value="V" type=button onclick="LookUp_OnClick();"></td>
<!-- <td>Exception Description:</td>
<td colspan=3><select name=combo style="width: 275;word-wrap: break-word;" onchange="filterVal(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=dWeek%>');" onclick="if(this.length==1){getData(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=sID%>', '<%=sPass%>', '<%=dWeek%>');}" ID=EXP_Desc><option value="*" selected>All</option></select></td>
-->
</tr>
<%else 'origin%>
<tr>
<td>Exception Code:</td>
<td><select name=combo style="width: 75;word-wrap: break-word;" onchange="filterVal(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=dWeek%>');" onclick="if(this.length==1){getData(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=sID%>', '<%=sPass%>', '<%=dWeek%>');}" ID=EXP_CD><option value="*" selected>All</option></select>
<input name=btnLookUp title="Look up the description of the exception code" value="V" type=button onclick="LookUp_OnClick();" ID=Button1></td>
<td>Exception Slic:</td>
<td colspan=2><select name=combo style="width: 75;word-wrap: break-word;" onchange="filterVal(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=dWeek%>');" onclick="if(this.length==1){getData(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=sID%>', '<%=sPass%>', '<%=dWeek%>');}" ID=EXP_SLIC><option value="*" selected>All</option></select></td>
</tr>
<tr>
<td>Exception Date:</td>
<td><select name=combo style="width: 100;word-wrap: break-word;" onchange="filterVal(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=dWeek%>');" onclick="if(this.length==1){getData(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=sID%>', '<%=sPass%>', '<%=dWeek%>');}" ID=EXP_DT><option value="*" selected>All</option></select></td>
<td>Exception Time:</td>
<td colspan=2><select name=combo style="width: 100;word-wrap: break-word;" onchange="filterVal(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=dWeek%>');" onclick="if(this.length==1){getData(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=sID%>', '<%=sPass%>', '<%=dWeek%>');}" ID=EXP_TM><option value="*" selected>All</option></select></td>
</tr>
<%end if
' if strPerspective = "DDA" then 'view the Destination interface%>
<!-- <tr bgcolor=silver>
<td colspan=6><b>&nbsp;Destination Information</b></td>
</tr>
<td>Building Slic:</td>
<td><select name=combo style="width: 75;word-wrap: break-word;" onchange="filterVal(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=dWeek%>');" onclick="if(this.length==1){getData(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=sID%>', '<%=sPass%>', '<%=dWeek%>');}" ID=BDG_SLIC><option value="*" selected>All</option></select></td>
<td>Destination Slic:</td>
<td ><select name=combo style="width: 75;word-wrap: break-word;" onchange="filterVal(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=dWeek%>');" onclick="if(this.length==1){getData(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=sID%>', '<%=sPass%>', '<%=dWeek%>');}" ID=DTN_SLIC><option value="*" selected>All</option></select></td>
</TR>-->
<%'end if%>
<tr bgcolor=silver>
<td colspan=6><b>&nbsp;Delivery Information</b></td>
</tr>
<%if strPerspective = "DDA" then 'view the Destination interface%>
<tr>
<td>Center Slic:</td>
<td colspan=2><select name=combo style="width: 75;word-wrap: break-word;" onchange="filterVal(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=dWeek%>');" onclick="if(this.length==1){getData(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=sID%>', '<%=sPass%>', '<%=dWeek%>');}" ID=CTR_SLIC><option value="*" selected>All</option></select></td>
<td>Delivery Driver:</td>
<td colspan=3><select name=combo style="width: 150;word-wrap: break-word;" onchange="filterVal(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=dWeek%>');" onclick="if(this.length==1){getData(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=sID%>', '<%=sPass%>', '<%=dWeek%>');}" id=DEL_DRV ><option value="*" selected>All</option></select></td>
<!--<td>Driver ID:</td>
<td colspan=2><select name=combo style="width: 75;word-wrap: break-word;" onchange="filterVal(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=dWeek%>');" onclick="if(this.length==1){getData(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=sID%>', '<%=sPass%>', '<%=dWeek%>');}" id=DRV_NR><option value="*" selected>All</option></select></td>
-->
</tr>
<%end if%>
<tr>
<%if strPerspective = "ODA" then 'view by origin%>
<td>Center Slic:</td>
<td ><select name=combo style="width: 75;word-wrap: break-word;" onchange="filterVal(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=dWeek%>');" onclick="if(this.length==1){getData(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=sID%>', '<%=sPass%>', '<%=dWeek%>');}" ID=CTR_SLIC><option value="*" selected>All</option></select></td>
<%end if%>
<td>Delivery City:</td>
<td <%if strPerspective = "DDA" then%> colspan=2 <%end if%>><select name=combo style="width: 150;word-wrap: break-word;" onchange="filterVal(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=dWeek%>');" onclick="if(this.length==1){getData(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=sID%>', '<%=sPass%>', '<%=dWeek%>');}" ID=DEL_CITY><option value="*" selected>All</option></select></td>
<td>Delivery State:</td>
<td><select name=combo style="width: 75;word-wrap: break-word;" onchange="filterVal(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=dWeek%>');" onclick="if(this.length==1){getData(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=sID%>', '<%=sPass%>', '<%=dWeek%>');}" ID=DEL_State><option value="*" selected>All</option></select></td>
</tr>
<tr>
<td>Scheduled Del Date:</td>
<td><select name=combo style="width: 100;word-wrap: break-word;" onchange="filterVal(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=dWeek%>');" onclick="if(this.length==1){getData(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=sID%>', '<%=sPass%>', '<%=dWeek%>');}" ID=SCH_DT><option value="*" selected>All</option></select></td>
<td>Delivery Date:</td>
<td><select name=combo style="width: 100;word-wrap: break-word;" onchange="filterVal(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=dWeek%>');" onclick="if(this.length==1){getData(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=sID%>', '<%=sPass%>', '<%=dWeek%>');}" ID=DEL_DT><option value="*" selected>All</option></select></td>
<td>Late By Day:</td>
<td><select name=combo style="width: 75;word-wrap: break-word;" onchange="filterVal(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=dWeek%>');" onclick="if(this.length==1){getData(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=sID%>', '<%=sPass%>', '<%=dWeek%>');}" ID=LBD_CD><option value="*" selected>All</option></select></td>
</tr>
<tr>
<td>Scheduled Del Time:</td>
<td><select name=combo style="width: 100;word-wrap: break-word;" onchange="filterVal(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=dWeek%>');" onclick="if(this.length==1){getData(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=sID%>', '<%=sPass%>', '<%=dWeek%>');}" ID=SCH_TM><option value="*" selected>All</option></select></td>
<td>Delivery Time:</td>
<td><select name=combo style="width: 100;word-wrap: break-word;" onchange="filterVal(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=dWeek%>');" onclick="if(this.length==1){getData(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=sID%>', '<%=sPass%>', '<%=dWeek%>');}" ID=DEL_TM><option value="*" selected>All</option></select></td>
<td>Late By Time:</td>
<td><select name=combo style="width: 75;word-wrap: break-word;" onchange="filterVal(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=dWeek%>');" onclick="if(this.length==1){getData(this, '<%=rr%>', '<%=dd%>', '<%=strPerspective%>', '<%=sID%>', '<%=sPass%>', '<%=dWeek%>');}" ID=LBT_CD><option value="*" selected>All</option></select></td>
</tr>


<TR valign=bottom height=30>
<TD colspan=6><p align="left"><input type="button" value="Submit Form" id=submit1 name=submit1 onclick="Submit_OnClick();">&nbsp;&nbsp;&nbsp;
<input type="reset" value="Reset Form" id=reset1 name=reset1> </p>
<input type="hidden" value="07" name="Region" ID=Hidden1>
<input type="hidden" name="query" ID=Hidden2>
<input type="hidden" name="UserID" value=<%=sID%> ID=Hidden3>
<input type="hidden" name="UserPwd" value=<%=sPass%> ID=Hidden4>
</TD>
</TR>
</table>
</form>
<script
SRC="</script>
<script language="vbscript">
function formatDate(byval dt)
dim out

'format the date to yyyy-mm-dd
out = year(dt) & "-" & month(dt) & "-" & day(dt)

formatDate = out
end function
</SCRIPT>
<script language=javascript >
document.frm.reset1.click();

function LookUp_OnClick(){


//iwr = opendialogwindow("x_ttr_xcp.asp",630,500);
window.open("x_ttr_xcp.asp?code="+document.frm.combo("EXP_CD").value,"_blank","height=400,scrollbars=yes,width=500,status=yes,toolbar=no,menubar=no,location=no");

}
function Submit_OnClick(){
document.frm.query.value = g_qry;
document.frm.submit();
}
function filterVal(vid, reg, dis, persp, week){
var control_length = eval(document.frm.combo.length);
var control = document.frm.combo;

window.status = "Loading..."
for(var i = 0;i<control_length;i++){
if(i == 0 && persp == "DDA"){
if(control("EXP_Alpha").value != "*" && eval(control("EXP_SLIC").length) >= 1 && vid.id == "EXP_Alpha"){
if(control("EXP_SLIC").length > 1){
deleteOptions(control("EXP_SLIC"));
control("EXP_SLIC").click();
}else
control("EXP_SLIC").click();
}
if(control("PU_Alpha").value != "*" && eval(control("PU_SLIC").length) >= 1 && vid.id == "PU_Alpha"){
if(control("PU_SLIC").length > 1){
deleteOptions(control("PU_SLIC"));
control("PU_SLIC").click();
}else
control("PU_SLIC").click();
}
}else if(i == 0){
if(control("PU_Alpha").value != "*" && eval(control("PU_SLIC").length) >= 1 && vid.id == "PU_Alpha"){
if(control("PU_SLIC").length > 1){
deleteOptions(control("PU_SLIC"));
control("PU_SLIC").click();
}else
control("PU_SLIC").click();
}
}
if(vid.id == control(i).id){
var tmpqry = createQry(document.frm.Region, reg, dis, persp, week);
continue;
}
var val = control(i).value;
if(persp == "DDA"){
if(control(i).id == "PU_SLIC"){
if(control("PU_Alpha").value == "*"){
if(eval(control(i).length) > 1){
deleteOptions(control(i));
control(i).click();
}
}
}else if(control(i).id == "EXP_SLIC"){
if(control("EXP_Alpha").value == "*"){
if(eval(control(i).length) > 1){
deleteOptions(control(i));
control(i).click();
}
}
}else{
if(eval(control(i).length) > 1){
deleteOptions(control(i));
control(i).click();
}
}
}else{
if(eval(control(i).length) > 1){
deleteOptions(control(i));
control(i).click();
}
}
control(i).value = val;
}
window.status = "Done."
g_qry = tmpqry;

}
function deleteOptions(vid){
var length = eval(vid.length);

for(var j = 0;j<length - 1;j++)
vid.remove(1);
}
function addWhere(vid, persp, qry, reg, dis){
if(persp == "ODA"){ //origin view
var type = "PU";
}else{ //destination view
var type = "DTN";
}
qry = qry.replace("ORDER BY 1", " ");
var control = document.frm.combo;
switch(vid)
{
case "PU_Alpha":
if(qry.indexOf("VNATSLIC") != -1){
qry = qry + " AND O099IA.VNATSLIC.REG_NR = O083IA.VTR4LPF.PKG_PU_REG_NR AND "+
"O099IA.VNATSLIC.DIS_NR = O083IA.VTR4LPF.PKG_PU_DIS_NR AND "+
"O099IA.VNATSLIC.OGZ_NR = O083IA.VTR4LPF.PKG_PU_OGZ_NR ";
}
break;
case "EXP_Alpha":
if(qry.indexOf("VNATSLIC") != -1){
if (control("PU_State").value != "*"){
qry = qry.replace("trim(both from O099IA.VNATSLIC.OGZ_ABR_NA)" , "trim(both from O083IA.VTR4LPF.PKG_XCP_RPT_OGZ_NR) AS XCP");
qry = "SELECT DISTINCT trim(both from O099IA.VNATSLIC.OGZ_ABR_NA) FROM (" + qry;
qry = qry + "), O083IA.VTR4LPF, O083IA.VTR4ADR, O099IA.VNATSLIC "+
"WHERE O083IA.VTR4LPF.PKG_DTN_REG_NR = '" + reg + "' AND "+
"O083IA.VTR4LPF.PKG_ALT_REF_NR = O083IA.VTR4ADR.PKG_ALT_REF_NR AND "+
"O083IA.VTR4LPF.PKG_DTN_DIS_NR = '" + dis + "' AND O099IA.VNATSLIC.REG_NR = O083IA.VTR4LPF.PKG_XCP_RPT_REG_NR AND "+
"O099IA.VNATSLIC.DIS_NR = O083IA.VTR4LPF.PKG_XCP_RPT_DIS_NR AND trim(both from O099IA.VNATSLIC.OGZ_NR) = XCP ";
}else{
qry = qry + " AND O099IA.VNATSLIC.REG_NR = O083IA.VTR4LPF.PKG_XCP_RPT_REG_NR AND "+
"O099IA.VNATSLIC.DIS_NR = O083IA.VTR4LPF.PKG_XCP_RPT_DIS_NR AND "+
"O099IA.VNATSLIC.OGZ_NR = O083IA.VTR4LPF.PKG_XCP_RPT_OGZ_NR ";
}
}
break;
case "EXP_SLIC":
if(persp == "DDA"){
if(qry.indexOf("VNATSLIC") != -1){
if (control("PU_State").value != "*"){
qry = qry.replace("FROM" , " AS XCP FROM");
qry = "SELECT DISTINCT trim(both from XCP) FROM (" + qry;
qry = qry.replace("AND trim(both from O099IA.VNATSLIC.OGZ_ABR_NA) = '"+control("EXP_Alpha").value+"'", " ");
qry = qry + "), O083IA.VTR4LPF, O083IA.VTR4ADR, O099IA.VNATSLIC "+
"WHERE O083IA.VTR4LPF.PKG_DTN_REG_NR = '" + reg + "' AND "+
"O083IA.VTR4LPF.PKG_ALT_REF_NR = O083IA.VTR4ADR.PKG_ALT_REF_NR AND "+
"O083IA.VTR4LPF.PKG_DTN_DIS_NR = '" + dis + "' AND O099IA.VNATSLIC.REG_NR = O083IA.VTR4LPF.PKG_XCP_RPT_REG_NR AND "+
"O099IA.VNATSLIC.DIS_NR = O083IA.VTR4LPF.PKG_XCP_RPT_DIS_NR AND trim(both from O099IA.VNATSLIC.OGZ_NR) = XCP ";
if(control("EXP_Alpha").value != "*")
qry = qry + " AND trim(both from O099IA.VNATSLIC.OGZ_ABR_NA) = '"+control("EXP_Alpha").value+"'";
}
}
}
break;
case "PU_State":
if(qry.indexOf("VNATSLIC") != -1){
qry = qry + " AND O099IA.VNATSLIC.REG_NR = O083IA.VTR4LPF.PKG_PU_REG_NR AND "+
"O099IA.VNATSLIC.DIS_NR = O083IA.VTR4LPF.PKG_PU_DIS_NR AND "+
"O099IA.VNATSLIC.OGZ_NR = O083IA.VTR4LPF.PKG_PU_OGZ_NR ";
}
break;
case "DTN_SLIC":
if(qry.indexOf("VNATSLIC") != -1){
qry = qry + " AND O099IA.VNATSLIC.REG_NR = O083IA.VTR4LPF.PKG_DTN_REG_NR AND "+
"O099IA.VNATSLIC.DIS_NR = O083IA.VTR4LPF.PKG_DTN_DIS_NR AND "+
"O099IA.VNATSLIC.FAC_LOC_NR = O083IA.VTR4LPF.PKG_DTN_OGZ_NR AND O099IA.VNATSLIC.OP_TYP_CD = 'PKG' ";
}
break;
}

qry = qry + " ORDER BY 1 ";
return qry;
}
function createQry(vid, reg, dis, persp, week){
var qrySelect = "SELECT DISTINCT ";
var qryFrom = "FROM O083IA.VTR4LPF, O083IA.VTR4ADR ";
if(persp == "ODA"){ //origin view
var qryWhere = "WHERE O083IA.VTR4LPF.PKG_PU_REG_NR = '" + reg + "' AND "+
"O083IA.VTR4LPF.PKG_ALT_REF_NR = O083IA.VTR4ADR.PKG_ALT_REF_NR AND "+
"O083IA.VTR4LPF.PKG_PU_DIS_NR = '" + dis + "' ";
var qryVNAT = " AND O099IA.VNATSLIC.REG_NR = O083IA.VTR4LPF.PKG_PU_REG_NR AND "+
"O099IA.VNATSLIC.DIS_NR = O083IA.VTR4LPF.PKG_PU_DIS_NR ";
}else{ //destination view
var qryWhere = "WHERE O083IA.VTR4LPF.PKG_DTN_REG_NR = '" + reg + "' AND "+
"O083IA.VTR4LPF.PKG_ALT_REF_NR = O083IA.VTR4ADR.PKG_ALT_REF_NR AND "+
"O083IA.VTR4LPF.PKG_DTN_DIS_NR = '" + dis + "' ";
var qryVNAT = " AND O099IA.VNATSLIC.REG_NR = O083IA.VTR4LPF.PKG_DTN_REG_NR AND "+
"O099IA.VNATSLIC.DIS_NR = O083IA.VTR4LPF.PKG_DTN_DIS_NR ";
}
var default_Where = qryWhere
var qryOrder = "ORDER BY 1 ";
var control_length = eval(document.frm.combo.length);
var control = document.frm.combo;

for(var i = 0;i<control_length;i++){

switch(control(i).id)
{
case "SVC_CD":
if(control(i).id == vid){ //vid is the control that has focus
qrySelect = qrySelect + " trim(both from O083IA.VTR4LPF.SVC_TYP_ABR_NA) ";
}else{
if(control(i).value != "*")
qryWhere = qryWhere + " AND trim(both from O083IA.VTR4LPF.SVC_TYP_ABR_NA) = '" + control(i).value + "' ";
}
break;
case "PU_SLIC":
if(control(i).id == vid){ //vid is the control that has focus
qrySelect = qrySelect + " trim(both from O083IA.VTR4LPF.PKG_PU_OGZ_NR) ";
}else{
if(control(i).value != "*"){
qryWhere = qryWhere + " AND trim(both from O083IA.VTR4LPF.PKG_PU_OGZ_NR) = '" + control(i).value + "' ";

}
}
break;
case "PU_DT":
if(control(i).id == vid){ //vid is the control that has focus
qrySelect = qrySelect + " trim(both from O083IA.VTR4LPF.PKG_PU_LCL_DT) ";
}else{
if(control(i).value != "*")
qryWhere = qryWhere + " AND trim(both from O083IA.VTR4LPF.PKG_PU_LCL_DT) = to_date('" + formatDate(control(i).value) + "', 'yyyy-mm-dd') ";
}
break;
case "PU_TM":
if(control(i).id == vid){ //vid is the control that has focus
qrySelect = qrySelect + " trim(both from O083IA.VTR4LPF.PKG_PU_LCL_SN_TM) ";
}else{
if(control(i).value != "*")
qryWhere = qryWhere + " AND trim(both from O083IA.VTR4LPF.PKG_PU_LCL_SN_TM) = '" + control(i).value + "' ";
}
break;
case "TRK_NR":
if(control(i).id == vid){ //vid is the control that has focus
qrySelect = qrySelect + " trim(both from O083IA.VTR4LPF.PKG_ALT_REF_NR) ";
}else{
if(control(i).value != "*")
qryWhere = qryWhere + " AND trim(both from O083IA.VTR4LPF.PKG_ALT_REF_NR) = '" + control(i).value + "' ";
}
break;
case "AC_NR":
if(control(i).id == vid){ //vid is the control that has focus
qrySelect = qrySelect + " trim(both from O083IA.VTR4ADR.AC_NR) ";
}else{
if(control(i).value != "*")
qryWhere = qryWhere + " AND trim(both from O083IA.VTR4ADR.AC_NR) = '" + control(i).value + "' ";
}
break;
case "AC_SLIC":
if(control(i).id == vid){ //vid is the control that has focus
qrySelect = qrySelect + " trim(both from O083IA.VTR4ADR.AC_ASN_OGZ_NR) ";
}else{
if(control(i).value != "*")
qryWhere = qryWhere + " AND trim(both from O083IA.VTR4ADR.AC_ASN_OGZ_NR) = '" + control(i).value + "' ";
}
break;
case "AC_NA":
if(control(i).id == vid){ //vid is the control that has focus
qrySelect = qrySelect + " trim(both from O083IA.VTR4ADR.AC_NA) ";
}else{
if(control(i).value != "*")
qryWhere = qryWhere + " AND trim(both from O083IA.VTR4ADR.AC_NA) = '" + control(i).value + "' ";
}
break;
case "PU_Alpha":
if(control(i).id == vid){ //vid is the control that has focus

if(qryFrom.indexOf("VNATSLIC") == -1){
qrySelect = qrySelect + " trim(both from O099IA.VNATSLIC.OGZ_ABR_NA) ";
qryFrom = qryFrom + ", O099IA.VNATSLIC ";
//qryWhere = qryWhere + " AND O099IA.VNATSLIC.REG_NR = O083IA.VTR4LPF.PKG_PU_REG_NR AND "+
// "O099IA.VNATSLIC.DIS_NR = O083IA.VTR4LPF.PKG_PU_DIS_NR AND "+
// "O099IA.VNATSLIC.OGZ_NR = O083IA.VTR4LPF.PKG_PU_OGZ_NR ";
}else{
qrySelect = qrySelect + " trim(both from O099IA.VNATSLIC.OGZ_ABR_NA) ";
if(control("EXP_Alpha").value != "*"){
var ctrl = control("EXP_SLIC");
deleteOptions(ctrl);
ctrl.click();
// qryWhere = qryWhere.replace("O099IA.VNATSLIC.OGZ_NR = O083IA.VTR4LPF.PKG_XCP_RPT_OGZ_NR", " O099IA.VNATSLIC.OGZ_NR = O083IA.VTR4LPF.PKG_PU_OGZ_NR ");
// qryWhere = qryWhere.replace("AND trim(both from O099IA.VNATSLIC.OGZ_ABR_NA) = '"+control("EXP_Alpha").value+"'", " ");
qryWhere = qryWhere + " AND trim(both from O083IA.VTR4LPF.PKG_XCP_RPT_OGZ_NR) = '"+ ctrl(1).value + "' ";
}
}
}else{
if(control(i).value != "*"){
if(vid == "PU_SLIC"){
if(qryFrom.indexOf("VNATSLIC") == -1){
qryFrom = qryFrom + ", O099IA.VNATSLIC ";
qryWhere = qryWhere + " AND O099IA.VNATSLIC.REG_NR = O083IA.VTR4LPF.PKG_PU_REG_NR AND "+
"O099IA.VNATSLIC.DIS_NR = O083IA.VTR4LPF.PKG_PU_DIS_NR AND "+
"O099IA.VNATSLIC.OGZ_NR = O083IA.VTR4LPF.PKG_PU_OGZ_NR AND "+
"trim(both from O099IA.VNATSLIC.OGZ_ABR_NA) = '"+control(i).value+"' ";
}else{
var ctrl = control("PU_SLIC");
qryWhere = qryWhere + " AND O099IA.VNATSLIC.OGZ_NR = O083IA.VTR4LPF.PKG_PU_OGZ_NR AND trim(both from O099IA.VNATSLIC.OGZ_ABR_NA) = '"+control(i).value+"' ";
if(vid == "EXP_Alpha"){
deleteOptions(ctrl);
ctrl.click();
qryWhere = qryWhere.replace("O099IA.VNATSLIC.OGZ_NR = O083IA.VTR4LPF.PKG_XCP_RPT_OGZ_NR", " O099IA.VNATSLIC.OGZ_NR = O083IA.VTR4LPF.PKG_PU_OGZ_NR ");
qryWhere = qryWhere.replace("AND trim(both from O099IA.VNATSLIC.OGZ_ABR_NA) = '"+control("EXP_Alpha").value+"'", " ");
qryWhere = qryWhere + " AND trim(both from O083IA.VTR4LPF.PKG_XCP_RPT_OGZ_NR) = '"+ ctrl(1).value + "' ";
}
}
}else{
var ctrl = control("PU_SLIC");
qryWhere = qryWhere + " AND trim(both from O083IA.VTR4LPF.PKG_PU_OGZ_NR) = '"+ctrl(1).value+"' ";
}

}
}
break;
case "PU_State":
if(control(i).id == vid){ //vid is the control that has focus
if(qryFrom.indexOf("VNATSLIC") == -1){
qrySelect = qrySelect + " trim(both from O099IA.VNATSLIC.ST_CD) ";
qryFrom = qryFrom + ", O099IA.VNATSLIC ";
// qryWhere = qryWhere + " AND O099IA.VNATSLIC.REG_NR = O083IA.VTR4LPF.PKG_PU_REG_NR AND "+
// "O099IA.VNATSLIC.DIS_NR = O083IA.VTR4LPF.PKG_PU_DIS_NR AND "+
// "O099IA.VNATSLIC.OGZ_NR = O083IA.VTR4LPF.PKG_PU_OGZ_NR ";
}else{
qrySelect = qrySelect + " trim(both from O099IA.VNATSLIC.ST_CD) ";
}
}else{
if(control(i).value != "*"){
if(qryFrom.indexOf("VNATSLIC") == -1){
qryFrom = qryFrom + ", O099IA.VNATSLIC ";
qryWhere = qryWhere + " AND O099IA.VNATSLIC.REG_NR = O083IA.VTR4LPF.PKG_PU_REG_NR AND "+
"O099IA.VNATSLIC.DIS_NR = O083IA.VTR4LPF.PKG_PU_DIS_NR AND "+
"O099IA.VNATSLIC.OGZ_NR = O083IA.VTR4LPF.PKG_PU_OGZ_NR AND "+
"trim(both from O099IA.VNATSLIC.ST_CD) = '"+control(i).value+"' ";
}else{
qryWhere = qryWhere + " AND trim(both from O099IA.VNATSLIC.ST_CD) = '"+control(i).value+"' ";
}
}
}
break;
case "EXP_SLIC":
if(control(i).id == vid){ //vid is the control that has focus
qrySelect = qrySelect + " trim(both from O083IA.VTR4LPF.PKG_XCP_RPT_OGZ_NR) ";
}else{
if(control(i).value != "*")
qryWhere = qryWhere + " AND trim(both from O083IA.VTR4LPF.PKG_XCP_RPT_OGZ_NR) = '" + control(i).value + "' ";
}
break;
case "EXP_DT":
if(control(i).id == vid){ //vid is the control that has focus
qrySelect = qrySelect + " trim(both from O083IA.VTR4LPF.PKG_XCP_RPT_DT) ";
}else{
if(control(i).value != "*")
qryWhere = qryWhere + " AND trim(both from O083IA.VTR4LPF.PKG_XCP_RPT_DT) = to_date('" + formatDate(control(i).value) + "', 'yyyy-mm-dd') ";
}
break;
case "EXP_TM":
if(control(i).id == vid){ //vid is the control that has focus
qrySelect = qrySelect + " trim(both from O083IA.VTR4LPF.PKG_XCP_RPT_TM) ";
}else{
if(control(i).value != "*")
qryWhere = qryWhere + " AND trim(both from O083IA.VTR4LPF.PKG_XCP_RPT_TM) = '" + control(i).value + "' ";
}
break;
case "EXP_Alpha":
if(control(i).id == vid){ //vid is the control that has focus
if(qryFrom.indexOf("VNATSLIC") == -1){
qrySelect = qrySelect + " trim(both from O099IA.VNATSLIC.OGZ_ABR_NA) ";
qryFrom = qryFrom + ", O099IA.VNATSLIC ";
// qryWhere = qryWhere + qryVNAT + " AND O099IA.VNATSLIC.OGZ_NR = O083IA.VTR4LPF.PKG_XCP_RPT_OGZ_NR ";
}else{
qrySelect = qrySelect + " trim(both from O099IA.VNATSLIC.OGZ_ABR_NA) ";
/*if(control("PU_Alpha").value != "*"){
var ctrl = control("PU_SLIC");
deleteOptions(ctrl);
ctrl.click();
qryWhere = qryWhere.replace("O099IA.VNATSLIC.OGZ_NR = O083IA.VTR4LPF.PKG_PU_OGZ_NR", " O099IA.VNATSLIC.OGZ_NR = O083IA.VTR4LPF.PKG_XCP_RPT_OGZ_NR ");
qryWhere = qryWhere.replace("AND trim(both from O099IA.VNATSLIC.OGZ_ABR_NA) = '"+control("PU_Alpha").value+"'", " ");
qryWhere = qryWhere.replace("AND O099IA.VNATSLIC.REG_NR = O083IA.VTR4LPF.PKG_PU_REG_NR AND O099IA.VNATSLIC.DIS_NR = O083IA.VTR4LPF.PKG_PU_DIS_NR", " ");
qryWhere = qryWhere + " AND trim(both from O083IA.VTR4LPF.PKG_PU_OGZ_NR) = '"+ ctrl(1).value + "' ";
}*/
}
}else{
if(control(i).value != "*"){
if(vid == "EXP_SLIC"){
if(qryFrom.indexOf("VNATSLIC") == -1){
qryFrom = qryFrom + ", O099IA.VNATSLIC ";
if(control("PU_State").value == "*")
qryWhere = qryWhere + " AND O099IA.VNATSLIC.OGZ_NR = O083IA.VTR4LPF.PKG_XCP_RPT_OGZ_NR AND trim(both from O099IA.VNATSLIC.OGZ_ABR_NA) = '"+control(i).value+"' ";
else
qryWhere = qryWhere + " AND trim(both from O099IA.VNATSLIC.OGZ_ABR_NA) = '"+control(i).value+"' ";
}else{
var ctrl = control("EXP_SLIC");
if(control("PU_State").value == "*")
qryWhere = qryWhere + " AND O099IA.VNATSLIC.OGZ_NR = O083IA.VTR4LPF.PKG_XCP_RPT_OGZ_NR AND trim(both from O099IA.VNATSLIC.OGZ_ABR_NA) = '"+control(i).value+"' ";
else
qryWhere = qryWhere + " AND trim(both from O099IA.VNATSLIC.OGZ_ABR_NA) = '"+control(i).value+"' ";
if(vid == "PU_Alpha"){
deleteOptions(ctrl);
ctrl.click();
qryWhere = qryWhere.replace("O099IA.VNATSLIC.OGZ_NR = O083IA.VTR4LPF.PKG_XCP_RPT_OGZ_NR", " O099IA.VNATSLIC.OGZ_NR = O083IA.VTR4LPF.PKG_PU_OGZ_NR ");
qryWhere = qryWhere.replace("AND trim(both from O099IA.VNATSLIC.OGZ_ABR_NA) = '"+control("EXP_Alpha").value+"'", " ");
qryWhere = qryWhere + " AND trim(both from O083IA.VTR4LPF.PKG_XCP_RPT_OGZ_NR) = '"+ ctrl(1).value + "' ";
}
}
}else{
var ctrl = control("EXP_SLIC");
qryWhere = qryWhere + " AND trim(both from O083IA.VTR4LPF.PKG_XCP_RPT_OGZ_NR) = '"+ctrl(1).value+"' ";
}

}
}
break;


case "EXP_CD":
if(control(i).id == vid){ //vid is the control that has focus
qrySelect = qrySelect + " trim(both from O083IA.VTR4LPF.XCP_ACY_STS_RSN_CD) ";
}else{
if(control(i).value != "*")
qryWhere = qryWhere + " AND trim(both from O083IA.VTR4LPF.XCP_ACY_STS_RSN_CD) = '" + control(i).value + "' ";
}
break;
case "CTR_SLIC":
if(control(i).id == vid){ //vid is the control that has focus
qrySelect = qrySelect + " trim(both from O083IA.VTR4LPF.DEL_OGZ_NR) ";
}else{
if(control(i).value != "*")
qryWhere = qryWhere + " AND trim(both from O083IA.VTR4LPF.DEL_OGZ_NR) = '" + control(i).value + "' ";
}
break;

case "DEL_CITY":
if(control(i).id == vid){ //vid is the control that has focus
qrySelect = qrySelect + " trim(both from O083IA.VTR4ADR.AD_POL_DIV_2_NA) ";
}else{
if(control(i).value != "*")
qryWhere = qryWhere + " AND trim(both from O083IA.VTR4ADR.AD_POL_DIV_2_NA) = '" + control(i).value + "' ";
}
break;
case "DEL_State":
if(control(i).id == vid){ //vid is the control that has focus
qrySelect = qrySelect + " trim(both from O083IA.VTR4ADR.AD_POL_DIV_1_CD) ";
}else{
if(control(i).value != "*")
qryWhere = qryWhere + " AND trim(both from O083IA.VTR4ADR.AD_POL_DIV_1_CD) = '" + control(i).value + "' ";
}
break;
case "SCH_DT":
if(control(i).id == vid){ //vid is the control that has focus
qrySelect = qrySelect + " trim(both from O083IA.VTR4LPF.PKG_SCH_DEL_DT) ";
}else{
if(control(i).value != "*")
qryWhere = qryWhere + " AND trim(both from O083IA.VTR4LPF.PKG_SCH_DEL_DT) = to_date('" + formatDate(control(i).value) + "', 'yyyy-mm-dd') ";
}
break;
case "DEL_DT":
if(control(i).id == vid){ //vid is the control that has focus
qrySelect = qrySelect + " trim(both from O083IA.VTR4LPF.DEL_PKG_SN_LCL_DT) ";
}else{
if(control(i).value != "*")
qryWhere = qryWhere + " AND trim(both from O083IA.VTR4LPF.DEL_PKG_SN_LCL_DT) = to_date('" + formatDate(control(i).value) + "', 'yyyy-mm-dd') ";
}
break;
case "LBD_CD":
if(control(i).id == vid){ //vid is the control that has focus
qrySelect = qrySelect + " trim(both from O083IA.VTR4ADR.PKG_DEL_LT_DY_IR) ";
}else{
if(control(i).value != "*")
qryWhere = qryWhere + " AND trim(both from O083IA.VTR4ADR.PKG_DEL_LT_DY_IR) = '" + control(i).value + "' ";
}
break;
case "SCH_TM":
if(control(i).id == vid){ //vid is the control that has focus
qrySelect = qrySelect + " trim(both from O083IA.VTR4LPF.PKG_SCH_DEL_TM) ";
}else{
if(control(i).value != "*")
qryWhere = qryWhere + " AND trim(both from O083IA.VTR4LPF.PKG_SCH_DEL_TM) = '" + control(i).value + "' ";
}
break;
case "DEL_TM":
if(control(i).id == vid){ //vid is the control that has focus
qrySelect = qrySelect + " trim(both from O083IA.VTR4LPF.DEL_PKG_SN_LCL_TM) ";
}else{
if(control(i).value != "*")
qryWhere = qryWhere + " AND trim(both from O083IA.VTR4LPF.DEL_PKG_SN_LCL_TM) = '" + control(i).value + "' ";
}
break;
case "LBT_CD":
if(control(i).id == vid){ //vid is the control that has focus
qrySelect = qrySelect + " trim(both from O083IA.VTR4ADR.PKG_DEL_LT_TM_IR) ";
}else{
if(control(i).value != "*")
qryWhere = qryWhere + " AND trim(both from O083IA.VTR4ADR.PKG_DEL_LT_TM_IR) = '" + control(i).value + "' ";
}
break;
case "DEL_DRV":
if(control(i).id == vid){ //vid is the control that has focus
qrySelect = qrySelect + " trim(both from O083IA.VTR4ADR.EMP_NA) ";
}else{
if(control(i).value != "*")
qryWhere = qryWhere + " AND trim(both from O083IA.VTR4ADR.EMP_NA) = '" + control(i).value + "' ";
}
break;
case "BDG_SLIC":
if(control(i).id == vid){ //vid is the control that has focus
qrySelect = qrySelect + " trim(both from O083IA.VTR4LPF.PKG_DTN_OGZ_NR) ";
}else{
if(control(i).value != "*")
qryWhere = qryWhere + " AND trim(both from O083IA.VTR4LPF.PKG_DTN_OGZ_NR) = '" + control(i).value + "' ";
}
break;
case "DTN_SLIC":
if(control(i).id == vid){ //vid is the control that has focus
if(qryFrom.indexOf("VNATSLIC") == -1){
qrySelect = qrySelect + " trim(both from O099IA.VNATSLIC.OGZ_NR) ";
qryFrom = qryFrom + ", O099IA.VNATSLIC ";
// qryWhere = qryWhere + qryVNAT + " AND O099IA.VNATSLIC.OGZ_NR = O083IA.VTR4LPF.PKG_XCP_RPT_OGZ_NR ";
}else{
qrySelect = qrySelect + " trim(both from O099IA.VNATSLIC.OGZ_NR) ";
//if(control("PU_Alpha").value != "*"){
// var ctrl = control("PU_SLIC");
// deleteOptions(ctrl);
// ctrl.click();
// qryWhere = qryWhere.replace("O099IA.VNATSLIC.OGZ_NR = O083IA.VTR4LPF.PKG_PU_OGZ_NR", " O099IA.VNATSLIC.OGZ_NR = O083IA.VTR4LPF.PKG_XCP_RPT_OGZ_NR ");
// qryWhere = qryWhere.replace("AND trim(both from O099IA.VNATSLIC.OGZ_ABR_NA) = '"+control("PU_Alpha").value+"'", " ");
// qryWhere = qryWhere.replace("AND O099IA.VNATSLIC.REG_NR = O083IA.VTR4LPF.PKG_PU_REG_NR AND O099IA.VNATSLIC.DIS_NR = O083IA.VTR4LPF.PKG_PU_DIS_NR", " ");
// qryWhere = qryWhere + " AND trim(both from O083IA.VTR4LPF.PKG_PU_OGZ_NR) = '"+ ctrl(1).value + "' ";
//}
}
}else{
if(control(i).value != "*"){
if(qryFrom.indexOf("VNATSLIC") == -1){
qryFrom = qryFrom + ", O099IA.VNATSLIC ";
qryWhere = qryWhere + qryVNAT + " AND O099IA.VNATSLIC.OP_TYP_CD = 'PKG' AND O099IA.VNATSLIC.FAC_LOC_NR = O083IA.VTR4LPF.PKG_DTN_OGZ_NR AND trim(both from O099IA.VNATSLIC.OGZ_NR) = '"+control(i).value+"' ";
}else{
var ctrl = control("EXP_SLIC");
qryWhere = qryWhere + " AND O099IA.VNATSLIC.OP_TYP_CD = 'PKG' AND O099IA.VNATSLIC.FAC_LOC_NR = O083IA.VTR4LPF.PKG_DTN_OGZ_NR AND trim(both from O099IA.VNATSLIC.OGZ_NR) = '"+control(i).value+"' ";
// if(vid == "PU_Alpha"){
// deleteOptions(ctrl);
// ctrl.click();
// qryWhere = qryWhere.replace("O099IA.VNATSLIC.OGZ_NR = O083IA.VTR4LPF.PKG_XCP_RPT_OGZ_NR", " O099IA.VNATSLIC.OGZ_NR = O083IA.VTR4LPF.PKG_PU_OGZ_NR ");
// qryWhere = qryWhere.replace("AND trim(both from O099IA.VNATSLIC.OGZ_ABR_NA) = '"+control("EXP_Alpha").value+"'", " ");
// qryWhere = qryWhere + " AND trim(both from O083IA.VTR4LPF.PKG_XCP_RPT_OGZ_NR) = '"+ ctrl(1).value + "' ";
// }
}

}
}
break;
}
}
var qry = qrySelect + " " + qryFrom + " " + qryWhere + " " + qryOrder

return qry;
}
function getData(vid, reg, dis, persp, id, pass, week){
var oASP
var ret
var data
window.status = "Loading..."
vid(0).text = "Loading...";

oASP = RSGetASPObject("../include/TTRFunc.asp");

g_qry = createQry(vid.id, reg, dis, persp, week);
g_qry = addWhere(vid.id, persp, g_qry, reg, dis);
// alert(g_qry);
ret = oASP.Method1(g_qry, id, pass);
data = ret.return_value;
var ar = data.split("|");
for (var j = 0;j<ar.length; j++)
{
var oOption = document.createElement('OPTION');
oOption.text = ar[j];
oOption.value = ar[j];
vid.add(oOption);
}
vid(0).text = "All";
window.status = "Done."
}

</script>


</body>
</html>
 
I'll be amazed if anyone even tries this one. What line is the error on? Does the page load at all? Maybe you could post more code for someone to wade through. I'd give someone a star just for attempting it.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Either you have syntax error in target remote script, not included RS.asp or not enabled RSDispatch.

But please - I have only 2 19" monitors left :)>
 
It does not tell me what line the error is at. I click on the command button on the form and that is the error I get.
 
Type URL for remote script directly into browser. If there is any syntax error, that's likely the problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top