We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now

x

Submit the form get the error .Form does not support this property or method

erikTsomik
erikTsomik asked
on
Medium Priority
534 Views
Last Modified: 2013-12-24
I am trying to submit the form but instead getting the error Form does not support this property or method in this line       document.frm.submit();

Please help


<!--- Report Sunrise EDIT Status --->
<cfoutput>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<cfset adminID = 999999999>
<!--- variables for standard Header --->
<cfset hdr_RptID = "EDIT-ESR">
<cfset hdr_SysID = "EXECUTIVE DIRECTOR IN TRAINING">
<cfset hdr_RptName = "Pipeline Report">
<!--- end header variables --->
<!--- Set Access Levels --->
<cfset omniAdmin 		= "1">
<cfset Lvl_Admin		= "1">
<cfset Lvl_RegionalVP 	= "2">
<cfset Lvl_AreaManager 	= "3">
<cfset Lvl_Executive 	= "10">
<CFSET todayDate = Now()>
<CFSET eyear = #DatePart("yyyy", todayDate)#>
<CFSET todayDate = Now()>
		<CFSET eyear = #DatePart("yyyy", todayDate)#>
		<CFSET emonth = #DatePart("m", todayDate)#>
		<CFSET eday = #DatePart("d", todayDate)#>
 
<cfset AdministratorAccessEDIT 	= false>
<cfset RegionalAccessEDIT 		= false>
<cfset AreaAccessEDIT 			= false>
<cfset ExecutiveAccessEDIT 		= false>
 
<cfparam name = "regionalVP" 	default = 0>
<cfparam name = "areaManager" 	default = 0>
<cfparam name = "macroc" 		default = 0>
<cfparam name = "microc" 		default = 0>
<cfparam name = "reportType" 	default = "Community Detail">
<!--- Administrator - ALL AccessEDIT or --->
<!--- <cfif session.AccessEDIT is omniAdmin or session.AccessEDIT is Lvl_Executive session.AccessEDIT is Lvl_AreaManager> --->
	<cfset AdministratorAccessEDIT = true>
	<cfquery name="getRegMgr" datasource="cfelsunrise" dbtype="ODBC">
		select Last_Name, First_Name, Middle_Name, employeeID
		from Region
		Join Employee	on region.ManagerEmpID = Employee.employeeID 
		where Foreignflag is NULL
		order by Last_Name, First_Name, Middle_Name
	</cfquery>
	<cfquery name="getAreaMgr" datasource="cfelsunrise" dbtype="ODBC">
		select Last_Name, First_Name, Middle_Name, employeeID
		from Area
		Join Employee	on area.ManagerEmpID = Employee.employeeID 
		where Foreignflag is NULL
		order by Last_Name, First_Name, Middle_Name
	</cfquery>
	<cfquery name="getMacro" datasource="cfelsunrise" dbtype="ODBC">
		select l.Macro_Cluster
		from Location l
		where l.Macro_Cluster > ' '
		order by l.Macro_Cluster
	</cfquery>	
	<cfquery name="getMicro" datasource="cfelsunrise" dbtype="ODBC">
		select l.Micro_Cluster
		from Location l
		where l.Micro_Cluster > ' '
		order by l.Micro_Cluster
	</cfquery>	
 
<html>
<head>
<title>Report Sunrise EDIT Summary Report</title>
<!---<script type="text/javascript" src="../../../../CFIDE/scripts/ajax/package/cfajax.js"></script>--->
<script language="Javascript">
	function makeRequestAll(url,parameters)
{
var httpRequest=null;
var mode=true;//default to ASYNCHRONOUS
if(arguments.length==3)
{
mode=(arguments[2]==true);
}
 
 
if (window.XMLHttpRequest)// Mozilla, Safari, ...
 
    {
        httpRequest = new XMLHttpRequest();
        if (httpRequest.overrideMimeType )
        {
           // httpRequest.overrideMimeType('text/xml');
            // See note below about this line
        }
    } 
    else if (window.ActiveXObject)// IE
    {
        try {
            httpRequest = new ActiveXObject("Msxml2.XMLHTTP");
        } 
        catch (e)
        {
            try {
                httpRequest = new ActiveXObject("Microsoft.XMLHTTP"); 
            } 
            catch (e) {}
        }
    }
 
    if (!httpRequest)
    {
        alert('Giving up :( Cannot create an XMLHTTP instance');
        return false;
    }
 
    httpRequest.onreadystatechange = function(){ 
        if(httpRequest.readyState==4)
            reportResutlsAll(httpRequest.responseText);
 
    };
//alert(parameters);
    if(parameters)//POST request
    {
 
        httpRequest.open('POST', url, mode); 
        httpRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        httpRequest.setRequestHeader("Content-length", parameters.length);
        httpRequest.setRequestHeader("Connection", "close"); 
        httpRequest.send(parameters);
	
    }
    else//GET request
    {
        httpRequest.open('GET', url, mode);
		 httpRequest.send('');
	
    }
       
}
 
 
 function reportResutlsAll(strResult)
{
 
	document.frm.submit();
	
}
		
 
 
function preprocessAll2(obj)
{
        switch(obj.id)
    {
       
 
	
		
		case "chk":
		
			 var poststr="";
			  poststr += obj.id + "=" + encodeURI(obj.value);
			poststr += "&";
			
			poststr += "chk=" + encodeURI(document.getElementById("chk").value);
			//alert(poststr);
			makeRequestAll('test.cfm', poststr);
 
         break;
		 
	
		
		
		}
}
 
 
	function chkDates() {
		var errorMsg = "";
		var sYearValue = Number(document.forms.CrsComInfo.sYearChoice.value);	
		var sMonthValue = Number(document.forms.CrsComInfo.sMonthChoice.value);
		var sDayValue = Number(document.forms.CrsComInfo.sDayChoice.value);	
		var eYearValue = Number(document.forms.CrsComInfo.eYearChoice.value);
		var eMonthValue = Number(document.forms.CrsComInfo.eMonthChoice.value);				
		var eDayValue = Number(document.forms.CrsComInfo.eDayChoice.value);
		var sLeapYear = Number(sYearValue % 4);	//already past 2000
		var eLeapYear = Number(eYearValue % 4);	//already past 2000
// check for valid February dates
		if (sMonthValue == 2 && ((sLeapYear > 0 && sDayValue > 28) || (sLeapYear == 0 && sDayValue > 29)))
			errorMsg = "Error in the start date: bad date for February.  \n";
 		if ((sMonthValue == 4 || sMonthValue == 6 || sMonthValue == 9 || sMonthValue == 11) && (sDayValue > 30))
			errorMsg = errorMsg + "Error in the start date: there is no 31st in this month.  \n";
// check for valid dates for months with 30 days
		if (eMonthValue == 2 && ((eLeapYear > 0 && eDayValue > 28) || (eLeapYear == 0 && eDayValue > 29)))
			errorMsg = errorMsg + "Error in the end date: bad date for February.  \n";
 		if ((eMonthValue == 4 || eMonthValue == 6 || eMonthValue == 9 || eMonthValue == 11) && (eDayValue > 30))
			errorMsg = errorMsg + "Error in the end date: there is no 31st in this month.  \n";
// if bad date so far, give message; else make last check
		if (errorMsg != "") 
			alert(errorMsg);
		else {		// last check: dates are valid, now make sure start date before or equal to end date
				if ((sYearValue > eYearValue) || ((sYearValue == eYearValue) && (sMonthValue > eMonthValue)) || ((sYearValue == eYearValue) && (sMonthValue == eMonthValue) && (sDayValue > eDayValue)))
								alert("Error: Your start date comes after your end date.");
// alert("sYearValue,eYearValue-sMonthValue,eMonthValue-sDayValue,eDayValue = " + sYearValue +"," + eYearValue +"-"+sMonthValue+","+eMonthValue+"-"+sDayValue+","+eDayValue );
				else
					document.forms.CrsComInfo.submit();
		}
	} 
	function goOn() {
		self.location.replace('EDITmenu.cfm');
	}
		function OpenPrintPage() {
			window.open(location.href, 'PrintWin', 'toolbar=yes, directories=no, location=no, status=yes, menubar=no, resizable=yes, scrollbars=yes, width=500, height=400');
		}
	</script>
	<script language="javascript">
	<!--
	function printpage()
	  {
	  window.print()
	  }
 
	function validateForm(){
	
		var estr = "";
		
		if (estr > "") {
			alert("Please complete the following:\n" + estr);
			return false;			
		}else{
			document.reportForm.submit();
		}
	}
	function goMenu() {
		self.location.replace('#session.menu#');
	}
	function goCancel() {
		self.location.replace('#CGI.SCRIPTNAME#');
	}
	function goProcessAnotherReport() {
		self.location.replace('#CGI.SCRIPT_NAME#');
	}
	
	<!-- Disables drop downs if one is selected.  User can only have one drop down selected to run the report -->
	function selectDropdown(selectedDropDown){
		if(selectedDropDown == 'regionalVP'){
			document.reportForm.areaManager.disabled = 'disabled';
			document.reportForm.macroc.disabled = 'disabled';
			document.reportForm.microc.disabled = 'disabled';
		
			if (document.reportForm.regionalVP.value == '0'){
				document.reportForm.areaManager.disabled = '';
				document.reportForm.macroc.disabled = '';
				document.reportForm.microc.disabled = '';
			}			
		}
		
		if(selectedDropDown == 'areaManager'){
			document.reportForm.regionalVP.disabled = 'disabled';
			document.reportForm.macroc.disabled = 'disabled';
			document.reportForm.microc.disabled = 'disabled';
		
			if (document.reportForm.areaManager.value == '0'){
				document.reportForm.regionalVP.disabled = '';
				document.reportForm.macroc.disabled = '';
				document.reportForm.microc.disabled = '';
			}			
		}
		
		if(selectedDropDown == 'macroc'){
			document.reportForm.regionalVP.disabled = 'disabled';
			document.reportForm.areaManager.disabled = 'disabled';
			document.reportForm.microc.disabled = 'disabled';
		
			if (document.reportForm.macroc.value == '0'){
				document.reportForm.regionalVP.disabled = '';
				document.reportForm.areaManager.disabled = '';
				document.reportForm.microc.disabled = '';
			}			
		}	
		if(selectedDropDown == 'microc'){
			document.reportForm.regionalVP.disabled = 'disabled';
			document.reportForm.areaManager.disabled = 'disabled';
			document.reportForm.macroc.disabled = 'disabled';
		
			if (document.reportForm.microc.value == '0'){
				document.reportForm.regionalVP.disabled = '';
				document.reportForm.areaManager.disabled = '';
				document.reportForm.macroc.disabled = '';
			}			
		}	
	}
	// -->
	</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body,td,th {
	font-family: Times New Roman, Times, serif;
	font-size: 12px;
}
-->
</style>
</head>
<body >
<cfif not isdefined('submitForm')>
<!---	<link rel="stylesheet" href="../css/style.css" />--->
	<div id="hdr_ctr">
		<cfinclude template="../includes/stdHeader.cfm">
		<!--- <font color="gray">pCard Training Status Report ss a .... </font><br>&nbsp; --->
		<br>
	</div>
	<div id="reportCopyForm">
		<form action="#CGI.SCRIPT_NAME#?requesttimeout=7500" name="reportForm" method="post">
			<cfif AdministratorAccessEDIT>								
				<b>Regional VP:</b><br />
				<select name="regionalVP" onChange="javascript: selectDropdown('regionalVP');">
					<option value="0">- All Regional VPs -</option>
					<cfset lastEmp = '***'>
					<cfloop query="getRegMgr">
						<cfif employeeID is not lastEmp>
							<option value="#employeeID#">#last_name#, #first_name# #middle_name#</option>
						</cfif>
						<cfset lastEmp = employeeID>
					</cfloop>
				</select>
				<br /><br />
			<cfelse>
				<input type="hidden" name="regionalVP" value="0">
			</cfif>
		
			<cfif AdministratorAccessEDIT or RegionalAccessEDIT or AreaAccessEDIT>
				<b>Area Manager:</b><br />
				<select name="areaManager" onChange="javascript: selectDropdown('areaManager');">
					<option value="0">- All Area Managers -</option>
					<cfset lastEmp = '***'>
					<cfloop query="getAreaMgr">
						<cfif employeeID is not lastEmp>
							<option value="#employeeID#">#last_name#, #first_name# #middle_name#</option>
						</cfif>
						<cfset lastEmp = employeeID>
					</cfloop>
				</select>
				<br /><br />
			<cfelse>
				<input type="hidden" name="areaManager" value="0">
			</cfif>
			
			<cfif AdministratorAccessEDIT or RegionalAccessEDIT or AreaAccessEDIT>				
				<b>Macro Cluster:</b><br />
				<select name="macroc" onChange="javascript: selectDropdown('macroc');">
					<option value="0">- All Macro Clusters -</option>
					<cfset Lastmacro = '***'>
					<cfloop query="getMacro">
						<cfif macro_cluster is not Lastmacro>
							<option value="#macro_cluster#">#macro_cluster#</option>
							<cfset Lastmacro = macro_cluster>
						</cfif>
					</cfloop>
				</select>
				<br /><br />
				<b>Micro Cluster:</b><br />
				<select name="microc" onChange="javascript: selectDropdown('microc');">
					<option value="0">- All Micro Clusters -</option>
					<cfset Lastmicro = '***'>
					<cfloop query="getMicro">
						<cfif micro_cluster is not Lastmicro>
							<option value="#micro_cluster#">#micro_cluster#</option>
							<cfset Lastmicro = micro_cluster>
						</cfif>
					</cfloop>
				</select>
				<br /><br />
				
				<table align="left">
		
		<tr>
			<td rowspan="2" valign="top" class="style3"><b>Select a starting date:</b> &nbsp;&nbsp;</td>
			<td class="style3">Day</td><td class="style3">Month</td><td class="style3">Year</td>
			<td rowspan="2" valign="top" class="style3">&nbsp;&nbsp;&nbsp;&nbsp; <b>Select an end date:</b> &nbsp;&nbsp;</td>
			<td class="style3">Day</td><td class="style3">Month</td><td class="style3">Year</td>
		</tr>
		
		<tr>
			<td class="style3">
			
 
			<cfoutput>
				<SELECT NAME="sDayChoice">
					<cfloop index="lsday" from="1" to="31" step="1">
						<option value="#lsday#" <cfif ((not IsDefined("form.sDayChoice") OR form.sDayChoice is "") and lsday is 1)>selected</cfif> >#lsday#</option>
					</cfloop>
				</SELECT>
				</cfoutput>			</td>
			<td class="style3">	<select name="sMonthChoice">
						<option value="1" <cfif (not IsDefined("form.sMonthChoice") OR form.sMonthChoice is "")>selected</cfif> >JAN</option>
						<option value="2" >FEB</option>
						<option value="3" >MAR</option>
						<option value="4" >APR</option>
						<option value="5" >MAY</option>
						<option value="6" >JUN</option>
						<option value="7" >JUL</option>
						<option value="8" >AUG</option>
						<option value="9" >SEP</option>
						<option value="10" >OCT</option>
						<option value="11" >NOV</option>
						<option value="12" >DEC</option>
				</SELECT>			</td>
			<td class="style3">	<SELECT NAME="sYearChoice">
						<option value="2006" <cfif (not IsDefined("form.sYearChoice") OR form.sYearChoice is "")>selected</cfif> >2006</option>
						<option value="2007" >2007</option>
						<option value="2008" >2008</option>
						<option value="2009" >2009</option>
 
				</SELECT>			</td>
			<td class="style3">	<cfoutput>
				<SELECT NAME="eDayChoice">
					<cfloop index="leday" from="1" to="31" step="1">
						<option value="#leday#" <cfif ((not IsDefined("form.eDayChoice") OR form.eDayChoice is "") and leday is eday)>selected</cfif> >#leday#</option>
					</cfloop>
				</SELECT>
				</cfoutput>			</td>
			<td class="style3">	<SELECT NAME="eMonthChoice">
						<option value="1" <cfif ((not IsDefined("form.eMonthChoice") OR form.eMonthChoice is "") and emonth is 1)>selected</cfif> >JAN</option>
						<option value="2" <cfif ((not IsDefined("form.eMonthChoice") OR form.eMonthChoice is "") and emonth is 2)>selected</cfif> >FEB</option>
						<option value="3" <cfif ((not IsDefined("form.eMonthChoice") OR form.eMonthChoice is "") and emonth is 3)>selected</cfif> >MAR</option>
						<option value="4" <cfif ((not IsDefined("form.eMonthChoice") OR form.eMonthChoice is "") and emonth is 4)>selected</cfif> >APR</option>
						<option value="5" <cfif ((not IsDefined("form.eMonthChoice") OR form.eMonthChoice is "") and emonth is 5)>selected</cfif> >MAY</option>
						<option value="6" <cfif ((not IsDefined("form.eMonthChoice") OR form.eMonthChoice is "") and emonth is 6)>selected</cfif> >JUN</option>
						<option value="7" <cfif ((not IsDefined("form.eMonthChoice") OR form.eMonthChoice is "") and emonth is 7)>selected</cfif> >JUL</option>
						<option value="8" <cfif ((not IsDefined("form.eMonthChoice") OR form.eMonthChoice is "") and emonth is 8)>selected</cfif>>AUG</option>
						<option value="9" <cfif ((not IsDefined("form.eMonthChoice") OR form.eMonthChoice is "") and emonth is 9)>selected</cfif> >SEP</option>
						<option value="10" <cfif ((not IsDefined("form.eMonthChoice") OR form.eMonthChoice is "") and emonth is 10)>selected</cfif> >OCT</option>
						<option value="11" <cfif ((not IsDefined("form.eMonthChoice") OR form.eMonthChoice is "") and emonth is 11)>selected</cfif> >NOV</option>
						<option value="12" <cfif ((not IsDefined("form.eMonthChoice") OR form.eMonthChoice is "") and emonth is 12)>selected</cfif> >DEC</option>
				</SELECT>			</td>
			<td class="style3">	<SELECT NAME="eYearChoice">
						<option value="2006" <cfif ((not IsDefined("form.eYearChoice") OR form.eYearChoice is "") and eyear is 2006)>selected</cfif>  >2006</option>
						<option value="2007" <cfif ((not IsDefined("form.eYearChoice") OR form.eYearChoice is "") and eyear is 2007)>selected</cfif>  >2007</option>
						<option value="2008" <cfif ((not IsDefined("form.eYearChoice") OR form.eYearChoice is "") and eyear is 2008)>selected</cfif>  >2008</option>
						<option value="2009" <cfif ((not IsDefined("form.eYearChoice") OR form.eYearChoice is "") and eyear is 2009)>selected</cfif>  >2009</option>
				</SELECT>			</td>
		</tr>
		</table>
		<br>
			<cfelse>
				<input type="hidden" name="macroc" value="0">
				<input type="hidden" name="microc" value="0">
			</cfif>
			<br>
			<p><br />Select EDIT Status:
					<br>
							<cfif session.AccessEDIT is Lvl_Executive>
									<input type="checkbox" name="Status" value="A" checked="checked">
									Active&nbsp;&nbsp;
									<cfelse>
										<input type="checkbox" name="Status" value="*" checked>
									All&nbsp;&nbsp;
										<input type="checkbox" name="Status" value="A">
									Active&nbsp;&nbsp;
										<input type="checkbox" name="Status" value="G">
									Graduated&nbsp;&nbsp;
										<input type="checkbox" name="Status" value="S">
									Sabbatical&nbsp;&nbsp;
										<input type="checkbox" name="Status" value="I">
									Incomplete&nbsp;&nbsp;
										<input type="checkbox" name="Status" value="W">
									Withdrew&nbsp;&nbsp;
										<input type="checkbox" name="Status" value="T">
									Terminated&nbsp;&nbsp;
							</cfif>
							<br>
							<br>
						<!---
							<p><br>Show Terminated People:&nbsp;
							
								<input type="checkbox" name="chkTerm" value="1">
							<br>
							<br>
							---->
					<strong style="font-size:12px;">Note:</strong>Please note that <strong>ALL</strong> does not include terminated people.<br>
							<input type="button" name="btn_submit" value="Show Report" onClick="validateForm();"/> 
							<input type="button" name="MainMenu" value="Main Menu" onClick="goMenu();" /> <br>
							
							<input type="hidden" name="submitForm" value="true" />					
				</p>
			</form>
	</div>
 
<cfelse>
	<cfflush interval="10">
	<!--- Show report progress bar --->
	<cfinclude template="../Includes/_showProgressBar.cfm">
	<!--- get report hdr records --->
	<cfif regionalVP gt 0>		
		<cfquery name="displayRegMgr" datasource="cfelsunrise" dbtype="ODBC">
			select Last_Name, First_Name, Middle_Name
			from Region
			Join Employee	on region.ManagerEmpID = Employee.employeeID 
			where Foreignflag is NULL 
				and employeeid = #regionalVP#
			order by Last_Name, First_Name, Middle_Name
		</cfquery>
		<cfset RegionalVPName 	= "#displayRegMgr.Last_Name#, #displayRegMgr.First_Name# #displayRegMgr.Middle_Name#">
	<cfelse>				
		<cfset RegionalVPName 	= "ALL">
	</cfif>
	
	<cfif areaManager gt 0>
		<cfquery name="displayAreaMgr" datasource="cfelsunrise" dbtype="ODBC">
			select Last_Name, First_Name, Middle_Name
			from Area
			Join Employee	on area.ManagerEmpID = Employee.employeeID 
			where Foreignflag is NULL
				and employeeid = #areaManager#
			order by Last_Name, First_Name, Middle_Name
		</cfquery>				
		<cfset AreaManagerName 	= "#displayAreaMgr.Last_Name#, #displayAreaMgr.First_Name# #displayAreaMgr.Middle_Name#">	
	<cfelse>
		<cfset AreaManagerName 	= "ALL">
	</cfif>
			
	<cfif macroc gt 0>
		<cfset displayMacro 	= "#macroc#">
	<cfelse>		
		<cfset displayMacro 	= "ALL">
	</cfif>
	<cfif microc gt 0>
		<cfset displayMicro 	= "#microc#">
	<cfelse>		
		<cfset displayMicro 	= "ALL">
	</cfif>
	
	<!--- Start Save Content --->	
	<cfsavecontent variable="strExcelData">	
	<link rel="stylesheet" href="../css/style.css" />
	<div id="hdr_ctr">
		<cfinclude template="../includes/stdHeader.cfm">
		<br>
	</div>		
	<div id="reportCopyDisplayValues" style="width:35%;">
		<div id="reportCopySelectedFields">Selection Criteria</div><br />
		<table border="0" id="reportCopyHeaderTable">
			<cfif AdministratorAccessEDIT>
				<tr>
					<td valign="top" class="tdRight"><b>Regional VP:</b></td>
					<td>#RegionalVPName#</td>
				</tr>
			</cfif>
			
			<cfif AdministratorAccessEDIT or RegionalAccessEDIT>
				<tr>
					<td valign="top" class="tdRight"><b>Area Manager:</b></td>
					<td>#AreaManagerName#</td>
				</tr>
			</cfif>
			<tr>
				<td valign="top" class="tdRight"><b>Macro Cluster:</b></td>
				<td>#displayMacro#</td>
			</tr>
			<tr>
				<td valign="top" class="tdRight"><b>Micro Cluster:</b></td>
				<td>#displayMicro#</td>
			</tr>
			<tr>
				<td valign="top" class="tdRight"><b>EDIT Status:</b></td>
				<td><cfif #TRIM(form.status)# eq "*">All
					<cfelseif #TRIM(form.status)# eq "C">Candidate	
					<cfelseif #TRIM(form.status)# eq "A">Active
					<cfelseif #TRIM(form.status)# eq "G">Graduated
					<cfelseif #TRIM(form.status)# eq "S">Sabbatical
					<cfelseif #TRIM(form.status)# eq "I">Incomplete
					<cfelseif #TRIM(form.status)# eq "W">Withdrew
					</cfif>
				</td>
			</tr>
		</table>
	</div>
	<table width="100%" align="center"  border="0" >
		<tr><td>
		<CFSET sDate = CreateODBCDate(#CreateDate(FORM.sYearChoice, FORM.sMonthChoice, FORM.sDayChoice)#)>
		<CFSET eDate = CreateODBCDate(#CreateDate(FORM.eYearChoice, FORM.eMonthChoice, FORM.eDayChoice)#)>
 
			<cfset ReqCourserray = ArrayNew(1)>
			<!--- load arrays with required course names and  --->
			<cfset ArrayAppend(ReqCourserray, "2201")>
			<cfset ArrayAppend(ReqCourserray, "SEL 315")>
			<cfset ArrayAppend(ReqCourserray, "2202")>
			<cfset ArrayAppend(ReqCourserray, "2104")>
			<cfset ArrayAppend(ReqCourserray, "2100")>
			<cfset ArrayAppend(ReqCourserray, "2103")>
			<cfset ArrayAppend(ReqCourserray, "2102")>
			<cfquery name="getcOURSE" datasource="cfelsunrise" dbtype="ODBC">
				select c.name, c.CourseID
				from  Course_Catalog c
				where (c.Name = '#ReqCourserray[1]#')
					or	(c.Name = '#ReqCourserray[2]#')
					or	(c.Name = '#ReqCourserray[3]#')
					or	(c.Name = '#ReqCourserray[4]#')
					or	(c.Name = '#ReqCourserray[5]#')
					or	(c.Name = '#ReqCourserray[6]#')
					or	(c.Name = '#ReqCourserray[7]#')
			</cfquery>
			<cfset CIDarray = ArrayNew(1)>
			<cfloop query="getcOURSE">
				<cfset ArrayAppend(CIDarray, courseID)>
			</cfloop>
			<!--- Load EDITs into Array for processing --->	
			<!---<cfquery name="getTerm" datasource="cfelsunrise" dbtype="ODBC">
				Select ep.Employeeid from EDITProgram ep
				inner join Employee e on e.Employeeid=ep.EmployeeID
				where e.terminationdate is not null
			</cfquery>
			<cfset lterm= ValueList(getTerm.Employeeid)>--->
			
			<cfquery name="getEmployees" datasource="cfelsunrise" dbtype="ODBC">
				select  e.First_Name, e.Middle_Name, e.Last_Name, e.servicedate, e.UserName,e.terminationDate,
					ep.EntryDate, ep.EDITStatus, ep.LearningGuide, ep.LearningGuide2, ep.LearningGuide3, ep.FocusArea1, ep.FocusArea2, ep.FocusArea3, ep.AMQuater, AMLocation, AMProgression,
					j.Description, l.Name, l.State, l.Macro_Cluster, l.Micro_cluster,
					eam.EmployeeID as eam_EmployeeID, eam.First_Name as eam_First_Name, eam.Middle_Name as eam_Middle_Name, eam.Last_Name as eam_Last_Name,
					erm.EmployeeID as erm_EmployeeID, erm.First_Name as erm_First_Name, erm.Middle_Name as erm_Middle_Name, erm.Last_Name as erm_Last_Name,
					eavp.EmployeeID as eavp_EmployeeID, eavp.First_Name as eavp_First_Name, eavp.Middle_Name as eavp_Middle_Name, eavp.Last_Name as eavp_Last_Name,e.EmployeeID
				from client_sunrise.dbo.EDITProgram ep
				<!---left outer join EDITStatus es on ep.EmployeeID=es.Employeeid--->
				Join  client_sunrise.dbo.Employee e					on e.EmployeeID = ep.EmployeeID
				Inner Join client_sunrise.dbo.EmployeeJobHistory h	ON h.EmployeeID = e.EmployeeID
				Inner join client_sunrise.dbo.JobAssignment a		on (a.sequence = h.sequence)
				Inner join client_sunrise.dbo.Location l			on l.LocationID = a.LocationID
				Inner join client_sunrise.dbo.JobCode_List j		on h.JobCode = j.JobCode
				Inner join client_sunrise.dbo.Area ar			on ar.AreaID = l.AreaID
				Inner join client_sunrise.dbo.Employee eam		on eam.employeeID = ar.ManagerEmpID
				Inner join client_sunrise.dbo.Region r			on r.RegionID = ar.RegionID
				Inner join client_sunrise.dbo.Employee erm		on erm.employeeID = r.ManagerEmpID
				Inner join client_sunrise.dbo.Employee eavp	on eavp.employeeID = r.AVPEmpID		
				where 
				0=0
				<cfif #trim(form.status)# is not "T">
				 and  a.EmplRcd=0 and a.EndDate is NULL
				<cfelse>
					and e.terminationDate is not null
				 </cfif>
				<!---if termination box is checked then show terminated people as well  --->
			
					<cfif #trim(form.status)# is not "*" and #trim(form.status)# is not "T" >
					 and ep.EDITStatus IN (#ListQualify(form.status,"'",",","CHAR")#)
					</cfif>
					<cfif isDefined("eDate") or Isdefined("sDate")>
						And (ep.EntryDate >= #sDate# AND ep.EntryDate <= #DateAdd("d",1,eDate)#)
					</cfif>
					<cfif regionalVP gt 0>and r.ManagerEmpID = #regionalVP#</cfif>
					<cfif areaManager gt 0>and ar.ManagerEmpID = #areaManager#</cfif>
					<cfif macroc gt 0>and l.Macro_Cluster = '#macroc#'</cfif>
					<cfif microc gt 0>and l.Micro_Cluster = '#microc#'</cfif>
			order by erm.Last_Name, erm.First_Name, erm.Middle_Name, erm.EmployeeID,
						eavp.Last_Name, eavp.First_Name, eavp.Middle_Name, eavp.EmployeeID, 
						eam.Last_Name, eam.First_Name, eam.Middle_Name, eam.EmployeeID, 
						e.Last_Name, e.First_Name, e.Middle_Name
		
			</cfquery>
			
			<tr><td>
				<table border="1" width="100%" style="border-collapse: collapse" cellpadding="2" align="center">
				<tr>
					<th valign="bottom">OutLiers</th>
					<th valign="bottom" width="30%">OutLiers Comment</th>
					<th valign="bottom">Name</th>
					<th valign="bottom">Position</th>
					<th valign="bottom">Community</th>
					<th valign="bottom">State</th>
					<th valign="bottom">Relocate</th>
					<th valign="bottom">Anniversary Date</th>
					<th  valign="bottom">EDIT Entry Date</th>
					<th  valign="bottom">Development Focus Area</th>
					<th  valign="bottom">Learning Guide</th>
					<th  valign="bottom">Community</th>
					<th  valign="bottom">Area Manager/AVP</th>
					<th  valign="bottom">Regional VP</th>
					<th  valign="bottom">Status</th>
					<th valign="bottom">Projected Completion Date</th>
					<th valign="bottom">Regional classroom 7 required</th>
					<th valign="bottom">Leadership Certificate Level 2</th>
					<th valign="bottom">% of curriculum completion</th>
					<th valign="bottom">Capstone</th>
					<th valign="bottom">Capstone Completion</th>
					<th valign="bottom">Macro Market</th>
					<th valign="bottom">Micro Market</th>
					<th valign="bottom">AM Projected placement</th>
					<th valign="bottom">AM Projected location</th>
					<th valign="bottom">AM Comments</th>
                    
				</tr>
				<cfset last_reg = "***">
				<cfset Cnt_reg = 0>
				<cfset Cnt_tot = 0>
				<cfset lastEmp = ''>
				<!---- Now loop through the array and check for Training Completion before displaying EDITs --->
				<cfloop query="getEmployees"> 
				<cfif 	lastEmp is not Employeeid>
                <!---Outliers block --->	
				<cfquery name="getForce" datasource="cfelsunrise" dbtype="ODBC">
	select * from EDITForce where EmpID=#EmployeeID#
</cfquery>
                <cfset quarters =datediff("q",EntryDate,now())> 
				
<cfset isSuccess=''>
<cfset msg=''>
<cfset msg1=''>
<cfset msg2=''>
<cfswitch expression="#quarters#">
	<cfcase value="0">
    	<cfset isSuccess=1>
		<cfset msg=''>
    </cfcase>
    <!---case1 chech the quater 1--->
    <cfcase value="1">
    	<cfquery name="getCert2" datasource="cfelsunrise" dbtype="ODBC">
		SELECT     CompletionDate, StartDate, EmployeeID, CourseID, CourseName, CourseType, CourseLength, EnteredBy, EntryDate, Sequence, Instructor, Comments, ErrFlag, 			CourseScore
		FROM         EmployeeTraining
		WHERE     (EmployeeID =#EmployeeID#) AND (CourseID = 1105) and completionDate is not null
</cfquery>
<cfset noderange=" AND b.nodeid BETWEEN 0 AND 9999">
<CFQUERY name="done" datasource="cfelsunrise">
			SELECT count(*) as count, sum(TTC) as hours FROM bookContents b
				Join bookcompletion c on	b.id=c.nodeid
				WHERE bookid=1
				And workbookitem=1
				and active=1 #noderange#
				and c.employeeid = #EmployeeID#
		</CFQUERY>
        
        <CFQUERY name="TTC" datasource="cfelsunrise">
			SELECT count(*) as count,sum(TTC) as hours FROM bookContents b
				WHERE bookid=1
				And workbookitem=1
				and active=1 #noderange#
		</CFQUERY>
        
       
			<cfif Done.hours is "">
				<cfset x2=0>
			<cfelse>
				<cfset x2=numberformat((#Done.hours#/#ttc.hours#)*100,"999")>
			</CFIF>
		
	
        
    	<cfif getCert2.recordcount gt 0 and x2 gte 25>
		<cfset isSuccess=1>
    <cfelse>
    	<cfset isSuccess=0>
    </cfif>
    <cfif getCert2.recordcount lte 0>
		<cfset msg='Has not completed Cert Level2 with the passing score of 80%.'>
	</cfif>
	<cfif x2 lt 25>
		<cfset msg='Has not completed 25% of the EDIT workbook.'>
	</cfif>
    
    </cfcase>
    
	<cfcase value="2">
	<cfquery name="getCert2" datasource="cfelsunrise" dbtype="ODBC">
		SELECT     CompletionDate, StartDate, EmployeeID, CourseID, CourseName, CourseType, CourseLength, EnteredBy, EntryDate, Sequence, Instructor, Comments, ErrFlag, 			CourseScore
		FROM         EmployeeTraining
		WHERE     (EmployeeID =#EmployeeID#) AND (CourseID = 1105) and completionDate is not null
</cfquery>
    	<cfquery name="getcOURSE" datasource="cfelsunrise" dbtype="ODBC">
        SELECT     CompletionDate, StartDate, EmployeeID, CourseID, CourseName, CourseType, CourseLength, EnteredBy, EntryDate, Sequence, Instructor, Comments, ErrFlag, 			CourseScore
		FROM         EmployeeTraining
		WHERE     (EmployeeID =#EmployeeID#) AND courseID in (589,591,592,593,595,596) and completionDate is not null
				
			</cfquery>
 
 
<cfset noderange=" AND b.nodeid BETWEEN 0 AND 9999">
<CFQUERY name="done" datasource="cfelsunrise">
			SELECT count(*) as count, sum(TTC) as hours FROM bookContents b
				Join bookcompletion c on	b.id=c.nodeid
				WHERE bookid=1
				And workbookitem=1
				and active=1 #noderange#
				and c.employeeid = #EmployeeID#
		</CFQUERY>
        
        <CFQUERY name="TTC" datasource="cfelsunrise">
			SELECT count(*) as count,sum(TTC) as hours FROM bookContents b
				WHERE bookid=1
				And workbookitem=1
				and active=1 #noderange#
		</CFQUERY>
        
       
			<cfif Done.hours is "">
				<cfset x2=0>
			<cfelse>
				<cfset x2=numberformat((#Done.hours#/#ttc.hours#)*100,"999")>
			</CFIF>
		
	
        
    	<cfif getcOURSE.recordcount gte 6 and x2 gte 50 and getCert2.recordcount gt 0>
		<cfset isSuccess=1>
    <cfelse>
    	<cfset isSuccess=0>
    </cfif>
	<cfif getcOURSE.recordcount lt 6>
		<cfset msg='Has not completed all of the 300 SU courses.'>
	</cfif>
	<cfif x2 lt 50>
		<cfset msg1='Has not completed 50% of the EDIT workbook.'>
	</cfif>
	
	<cfif getCert2.recordcount lte 0>
		<cfset msg2='Has not completed Cert Level2 with the passing score of 80%.'>
	</cfif>
	
    </cfcase>
    <cfcase value="3">
    	<!---<cfquery name="getActivities"  datasource="cfelsunrise" dbtype="ODBC">
					Select * from EDITFA_Activity
					where EmployeeID = #EmployeeID#
						and FocusArea !='' 
					order by ActivityDate Desc
				</cfquery>--->
    	
    <cfset noderange=" AND b.nodeid BETWEEN 0 AND 9999">
<CFQUERY name="done" datasource="cfelsunrise">
			SELECT count(*) as count, sum(TTC) as hours FROM bookContents b
				Join bookcompletion c on	b.id=c.nodeid
				WHERE bookid=1
				And workbookitem=1
				and active=1 #noderange#
				and c.employeeid = #EmployeeID#
		</CFQUERY>
        
        <CFQUERY name="TTC" datasource="cfelsunrise">
			SELECT count(*) as count,sum(TTC) as hours FROM bookContents b
				WHERE bookid=1
				And workbookitem=1
				and active=1 #noderange#
		</CFQUERY>
        
			<cfquery name="getCert2" datasource="cfelsunrise" dbtype="ODBC">
		SELECT     CompletionDate, StartDate, EmployeeID, CourseID, CourseName, CourseType, CourseLength, EnteredBy, EntryDate, Sequence, Instructor, Comments, ErrFlag, 			CourseScore
		FROM         EmployeeTraining
		WHERE     (EmployeeID =#EmployeeID#) AND (CourseID = 1105) and completionDate is not null
</cfquery>
    	<cfquery name="getcOURSE" datasource="cfelsunrise" dbtype="ODBC">
        SELECT     CompletionDate, StartDate, EmployeeID, CourseID, CourseName, CourseType, CourseLength, EnteredBy, EntryDate, Sequence, Instructor, Comments, ErrFlag, 			CourseScore
		FROM         EmployeeTraining
		WHERE     (EmployeeID =#EmployeeID#) AND courseID in (589,591,592,593,595,596) and completionDate is not null
				
			</cfquery>
       
	   
			<cfif Done.hours is "">
				<cfset x2=0>
			<cfelse>
				<cfset x2=numberformat((#Done.hours#/#ttc.hours#)*100,"999")>
			</CFIF>
		
	
        
    	<cfif  x2 gte 75 and getcOURSE.recordcount gte 6 and getCert2.recordcount eq 0>
		<cfset isSuccess=1>
    <cfelse>
    	<cfset isSuccess=0>
    </cfif>
    
	<!---
		<cfif getActivities.recordcount lt 3>
		<cfset msg='Has not completed 3 development plans activities.'>
	</cfif>--->
	<cfif x2 lt 75>
		<cfset msg1='Has not completed 75% of the EDIT workbook.'>
	</cfif>
	<cfif getcOURSE.recordcount lt 6>
		<cfset msg2='Has not completed all of the 300 SU courses.'>
	</cfif>
    
    </cfcase>
    
    <cfcase value="4;5;6;7;8;9;10" delimiters=";" >
    <cfquery name="getCert2" datasource="cfelsunrise" dbtype="ODBC">
		SELECT     CompletionDate, StartDate, EmployeeID, CourseID, CourseName, CourseType, CourseLength, EnteredBy, EntryDate, Sequence, Instructor, Comments, ErrFlag, 			CourseScore
		FROM         EmployeeTraining
		WHERE     (EmployeeID =#EmployeeID#) AND (CourseID = 1105) and completionDate is not null
</cfquery>
	<cfquery name="getcOURSE" datasource="cfelsunrise" dbtype="ODBC">
        SELECT     CompletionDate, StartDate, EmployeeID, CourseID, CourseName, CourseType, CourseLength, EnteredBy, EntryDate, Sequence, Instructor, Comments, ErrFlag, 			CourseScore
		FROM         EmployeeTraining
		WHERE     (EmployeeID =#EmployeeID#) AND courseID in (589,591,592,593,595,596) and completionDate is not null
				
			</cfquery>
     <cfset noderange=" AND b.nodeid BETWEEN 0 AND 9999">
<CFQUERY name="done" datasource="cfelsunrise">
			SELECT count(*) as count, sum(TTC) as hours FROM bookContents b
				Join bookcompletion c on	b.id=c.nodeid
				WHERE bookid=1
				And workbookitem=1
				and active=1 #noderange#
				and c.employeeid = #EmployeeID#
		</CFQUERY>
        
        <CFQUERY name="TTC" datasource="cfelsunrise">
			SELECT count(*) as count,sum(TTC) as hours FROM bookContents b
				WHERE bookid=1
				And workbookitem=1
				and active=1 #noderange#
		</CFQUERY>
        
       
			<cfif Done.hours is "">
				<cfset x2=0>
			<cfelse>
				<cfset x2=numberformat((#Done.hours#/#ttc.hours#)*100,"999")>
			</CFIF>
		
	
        
    	<cfif x2 eq 100 and getCert2.recordcount gt 0 and getcOURSE.recordcount gte 6>
		<cfset isSuccess=1>
    <cfelse>
    	<cfset isSuccess=0>
    </cfif>
 
	
	<cfif getcOURSE.recordcount lt 6>
		<cfset msg2='Has not completed all of the 300 SU courses.'>
	</cfif>	
	<cfif x2 lt 100>
		<cfset msg1='Has not completed 100% of the EDIT workbook.'>
		</cfif>
	
	<cfif getCert2.recordcount eq 0>
		<cfset msg='Has not complete Cert Level2 with the passing score of 80%.'>
	</cfif>
    
 
	
    </cfcase>
 
</cfswitch>
 
<!---End of outliers block--->
					<cfif last_reg neq erm_EmployeeID>
						<cfif last_reg neq "***">
							<!--- print subtotal line --->
							<tr>
								<th valign="Center" colspan="22" ><br>#last_regname# Count #Cnt_reg#<br>&nbsp;</th>
								<th valign="Center><br>#Cnt_reg#<br>&nbsp;</th>
								<th colspan="10>&nbsp;</th>
							</tr>
						</cfif>
						<cfset Cnt_reg = 0>
					</cfif>
					<cfset lStatus = EDITSTatus>
					<!--- get the latest status record, if one exists --->
					<cfquery name="getES" datasource="cfelsunrise" dbtype="ODBC">
						select EDITSTatus,StatusDate,sequence
						from EDITStatus 
						where	EmployeeID = #EmployeeID#
						order by sequence Desc
					</cfquery>
					<cfif getEs.recordcount is not 0>
						<cfset lStatus = getES.EDITSTatus>
						<cfset lStatusDate = getES.StatusDate>
					<cfelse>
						<cfset lStatusDate = 0>
					</cfif>
					<cfif LearningGuide GT 0>
						<!--- get the Learning Guides --->
						<cfquery name="getLGs" datasource="cfelsunrise" dbtype="ODBC">
							select e.First_Name, e.Middle_Name, e.Last_Name, l.Name
							from client_sunrise.dbo.Employee e	
							Join client_sunrise.dbo.EmployeeJobHistory h		ON h.EmployeeID = e.EmployeeID
							Inner join client_sunrise.dbo.JobAssignment a		on (a.sequence = h.sequence and a.emplrcd = 0 and a.EndDate is NULL)
							Inner join client_sunrise.dbo.Location l			on l.LocationID = a.LocationID
							where e.TerminationDate is NULL
								and ((e.employeeID = #LearningGuide#)
								<cfif LearningGuide2 GT 0> or (e.employeeID = #LearningGuide2#)</cfif>
								<cfif LearningGuide3 GT 0> or (e.employeeID = #LearningGuide3#)</cfif>
								)
						</cfquery>
					</cfif>
					<cfset session.employee=#employeeid#>
					<cfset EmpLAst = ''>
					<tr>
						<td valign="top" ><cfif getForce.Force eq 1><span style="font-size:34px; color:##FF0000; font-family:"Courier New", Courier, monospace">-</span><cfelseif getForce.Force eq 2>&nbsp;<cfelseif getForce.Force eq 3 and #isSuccess# neq 1><span style="font-size:34px; color:##FF0000; font-family:"Courier New", Courier, monospace">-</span><cfelseif #isSuccess# neq 1><span style="font-size:34px; color:##FF0000; font-family:"Courier New", Courier, monospace">-</span></cfif></td>
						<td valign="top"><cfif getForce.Force eq 2 > #getForce.comment#<cfelseif getForce.Force eq 1>#msg# #msg1# #msg2# #getForce.comment#<cfelseif getForce.Force eq 3>#msg# #msg1# #msg2#<cfelse>#msg# #msg1# #msg2#</cfif></td>
						<cfif EmployeeID is not EmpLAst>
						<td valign="top"><!---<a href="rpt_RptCard_edit.html?Employee=#session.employee#" target="_blank">--->#TRIM(Last_Name)#, #TRIM(First_Name)# #TRIM(middle_Name)#</a></td>
						<cfset EmpLast=EmployeeID>
						</cfif>
						<td valign="top">#TRIM(Description)#</td>
						<td valign="top">#TRIM(Name)#</td>
						<td  valign="top">#TRIM(State)#</td>
						<cfquery name="getRelocate" datasource="cfelsunrise" dbtype="ODBC">
							select * from SuApplication where EmployeeID=#EmployeeID#
						</cfquery>
						
						<td valign="top"><cfif getRelocate.Ans4_1A is "X">Yes<cfelseif getRelocate.Ans4_1B is "X">No</cfif></td>
						<td  valign="top">#DateFormat(ServiceDate, "dd-mmm-yy")#</td>
						<td  valign="top">#DateFormat(EntryDate, "mmm-yy")#</td>
<!---                        <td  valign="top"><cfif #isSuccess# eq 1><img src="../Images/greenFlag.jpg"><cfelse><img src="../Images/redflag.jpg"></cfif></td>--->
						<td  valign="top">#FocusArea1#
							<cfif FocusArea1 GT 0><br>#FocusArea2#</cfif>
							<cfif FocusArea3 GT 0><br>#FocusArea3#</cfif>
						</td>
						<cfif LearningGuide GT 0>
							<td  valign="top">
							<cfset lgcnt = 0>
							<cfloop query="getLGs">
								<cfset lgcnt = lgcnt + 1>
								#TRIM(getLGs.Last_Name)#, #TRIM(getLGs.First_Name)# #TRIM(getLGs.middle_Name)#
								<cfif lgcnt LT getLGs.recordcount><br></cfif>
							</cfloop>
							</td>
							<td  valign="top">
							<cfset lgcnt = 0>
							<cfloop query="getLGs">
								<cfset lgcnt = lgcnt + 1>
								#TRIM(getLGs.Name)#
 
								<cfif lgcnt LT getLGs.recordcount><br></cfif>
							</cfloop>
							</td>
						<cfelse>
							<td  valign="top">&nbsp;</td>
							<td  valign="top">&nbsp;</td>
						</cfif>
					
						<td  valign="top"><cfif eam_EmployeeID GT 0>#TRIM(eam_Last_Name)#, #TRIM(eam_First_Name)# #TRIM(eam_middle_Name)# <cfelse>&nbsp;</cfif>
							<cfif eavp_EmployeeID GT 0>&nbsp;/&nbsp;#TRIM(eavp_Last_Name)#, #TRIM(eavp_First_Name)# #TRIM(eavp_middle_Name)#</cfif>
						</td>
						<cfif erm_EmployeeID GT 0>
							<cfset regDisplay = "#TRIM(erm_Last_Name)#, #Left(erm_First_Name, 1)#.">
						<cfelse>
							<cfset regDisplay = "Unassigned">
						</cfif>
						<td  valign="top">#regDisplay#</td>
						<td  valign="top">
					<cfif terminationDate is ''>
						<cfif DatePart("yyyy",lStatusDate) gt 2003>
							<CFif #TRIM(lstatus)# is "A">Active (#DateFormat(lStatusDate,"mm/dd/yyyy")#)
								<cfelseif lstatus is "I">Incomplete (#DateFormat(lStatusDate,"mm/dd/yyyy")#)
								<cfelseif lstatus is "G">Graduated (#DateFormat(lStatusDate,"mm/dd/yyyy")#)
								<cfelseif lstatus is "S">Sabbatical (#DateFormat(lStatusDate,"mm/dd/yyyy")#)
								<cfelseif lstatus is "W">Withdrew (#DateFormat(lStatusDate,"mm/dd/yyyy")#)
								<cfelse>Unknown
							</cfif>
						<cfelse>
							<CFif #TRIM(lstatus)# is "A">Active 
							<cfelseif lstatus is "I">Incomplete
							<cfelseif lstatus is "G">Graduated 
							<cfelseif lstatus is "S">Sabbatical 
							<cfelseif lstatus is "W">Withdrew 
							<cfelseif TerminationDate neq '' and (lstatus is "A" or status is "I" or lstatus is "G" or lstatus is "S")>Terminated
							<cfelse>Unknown
							</cfif>
						</cfif>
					<cfelse>
					 	Terminated(#DateFormat(terminationDate,"mm/dd/yyyy")#)
					</cfif>
							
								
							
							
						</td>
						<cfset x2="N/A">
						<!---Readiness TBD--->
						<cfset seg="OVERALL">
						<cfset noderange=" AND b.nodeid BETWEEN 0 AND 9999">
						<CFQUERY name="TTC" datasource="cfelsunrise">
							SELECT count(*) as count,sum(TTC) as hours FROM bookContents b
								WHERE bookid=1
								And workbookitem=1
								and active=1 #noderange#
						</CFQUERY>
						<CFQUERY name="done" datasource="cfelsunrise">
							SELECT count(*) as count, sum(TTC) as hours FROM bookContents b
								Join bookcompletion c on	b.id=c.nodeid
								WHERE bookid=1
								And workbookitem=1
								and active=1 #noderange#
								and c.employeeid = #EmployeeID#
						</CFQUERY>
						<cfif done.hours is not ""><cfset remhours = ttc.hours - done.hours><cfelse><cfset remhours = ttc.hours></cfif>
						<cfset remweeks = remhours / 8>
						<cfset remdays = remweeks * 7>
						<cfset todaydt = now()>
						<cfset compdate = #DATEADD("d", remdays, todaydt)#>
						<cfif ttc.hours is not 0>
							<cfif Done.hours is "">
								<cfset x2=0>
							<cfelse>
								<cfset x2=numberformat((#Done.hours#/#ttc.hours#)*100,"999")>
							</CFIF>
						<cfelse>
							<cfset x2="N/A">
						</CFIF>
						<CFif #TRIM(lstatus)# is "A">
							<td valign="top" >#Dateformat(compdate, "mmm-yy")#</td>
						<cfelse>
							<td valign="top" >&nbsp;</td>
						</CFif>
						<!--- end readiness calc --->	
						<cfquery name="getReqmts" datasource="cfelsunrise" dbtype="ODBC">
							select distinct et.CourseID
							from  EmployeeTraining et
							where et.EmployeeID = #EmployeeID#
								and et.CompletionDate > 0
								and ((et.CourseID = #CIDarray[1]#)
								or	(et.CourseID = #CIDarray[2]#)
								or	(et.CourseID = #CIDarray[3]#)
								or	(et.CourseID = #CIDarray[4]#)
								or	(et.CourseID = #CIDarray[5]#)
								or	(et.CourseID = #CIDarray[6]#)
								or	(et.CourseID = #CIDarray[7]#))
						</cfquery>
						<td  valign="top">#getReqmts.recordcount#</th>
						<!--- ========= Self Study Level 2 ========= --->
						<cfinclude TEMPLATE="../includes/inc_CLC2_Lessons.cfm">
						<cfset emptests = 0>
						<cfset emppct = 0>
						<!--- Loop through results checking scores--->
						<cfloop from="1" to="#ArrayLen(lessonArray)#" index="i"> 
							<cfset lessonnum = i + 856>
							<!--- First find all of the test results of for the selected --->		
							<cfquery name="getAllResults" datasource="cfellearner" dbtype="ODBC">	
								select testdate, QuestionMaxPts, AnswerPts
								from Learner l
								join learnerresultsdetail lrd	on (lrd.Learnerid = l.Learnerid and lrd.QuestionMaxPts > 0)
								Where l.LoginName = '#UserName#'
									and lrd.LessonID = #lessonnum#
									and lrd.questionnum = 0
								order by lrd.answerpts DESC
							</cfquery>
							<cfif getAllResults.recordcount is not 0>
								<cfset testpct = #Round((getAllResults.AnswerPts / getAllResults.QuestionMaxPts) * 100)#>
								<cfset emppct = emppct + testpct>
								<cfset emptests = emptests + 1>
							</cfif>
						</cfloop>
						<cfif emptests is #arrayLen(LessonArray)#>
							<cfset L2score = #Round((emppct / emptests))#>
							<td  valign="top">#L2score#%</th>
						<cfelseif emptests GT 0>
							<td  valign="top">In progress</th>
						<cfelse>
							<td  valign="top">n/a</th>
						</cfif>
						<!---get available capstone for people who already submitted--->
						<cfquery name="getCapstone" datasource="cfelsunrise" dbtype="odbc">
								Select EmpID,DateUploaded,image,isAccept from EDITCapstone where EmpID = #EmployeeID#
						</cfquery>
						<td  valign="top">#x2#<cfif x2 is not "N/A">%</cfif></td>
						<td valign="top"><cfif getCapstone.recordcount gt 0><a href="capstone/#getCapstone.image#" target="_blank">The Capstone is available</a><cfelse>Capstone is unavailable</cfif> </td>
						<td valign="top" align="center">
							<form name="frm" method="post" action="" id="frm">
								<input type="checkbox" name="chk" id="chk" value="#getCapstone.isAccept#" onClick="preprocessAll2 (this);" <cfif getCapstone.isAccept eq 1>checked</cfif>>
							</form>
						
						
						</td>
						<td valign="top">#Macro_Cluster#</th>
						<td valign="top">#Micro_Cluster#</th>
						<td valign="top">#AMQuater#</th>
						<td valign="top">#AMLocation#</th>
						<td valign="top">#AMProgression#</th>
                      	
					</tr>
					</tr>
					
					<cfset last_reg = erm_EmployeeID>
					<cfset last_regname = regDisplay>
					<cfset Cnt_reg = Cnt_reg + 1>
					<cfset Cnt_tot = Cnt_tot + 1>
					<cfset 	lastEmp=Employeeid>
</cfif>
				</cfloop>
				<cfif last_reg neq "***">
					<!--- print subtotal line --->
					<tr>
						<th valign="Center" colspan="10"><br>#last_regname# Count <br>&nbsp;</th>
						<th valign="Center" ><br>#Cnt_reg#<br>&nbsp;</th>
						<th colspan="10">&nbsp;</th>
					</tr>
				</cfif>
				<cfif last_reg neq "***">
					<!--- print grand line --->
					<tr>
						<th valign="Center" colspan="10"><br>Sunrise Total Count <br>&nbsp;</th>
						<th valign="Center" ><br>#Cnt_tot#<br>&nbsp;</th>
						<th colspan="10">&nbsp;</th>
					</tr>
				</cfif>
				</td>
				</tr>
			</table>
		<div align="center">
			<form name="form1">
				<!--- <input type="button" value="Print this page" onClick="printpage()" />	--->
				<input type="button" name="processAnotherReport" value="Process Another Report" onClick="goProcessAnotherReport();"/> <input type="button" name="MainMenu" value="Main Menu" onClick="goMenu();" />
			</form>
		</div>
 
<!--- </CFPROCESSINGDIRECTIVE> --->
 
					<!--- End content here --->		
    </td>
	</tr>
</table>
</cfsavecontent>
</cfif>
 
</cfoutput>
<!--- stop report progress bar --->
<cfinclude template="../Includes/_stopProgressBar.cfm">
</body>
</html>
 
<cfif isdefined('submitForm')>
	<cfoutput>
	#strExcelData#
</cfoutput>
</cfif>

Open in new window

Comment
Watch Question

Commented:
Hey. Try using  document.getElementById('frm').submit(); in your code and see if that works.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
erikTsomikSystem Architect, CF programmer

Author

Commented:
That wsa close enough
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.