<?php
$tdataOpen_Leads_Report=array();
	$tdataOpen_Leads_Report[".NumberOfChars"]=80; 
	$tdataOpen_Leads_Report[".ShortName"]="Open_Leads_Report";
	$tdataOpen_Leads_Report[".OwnerID"]="";
	$tdataOpen_Leads_Report[".OriginalTable"]="lead_table";


	
//	field labels
$fieldLabelsOpen_Leads_Report = array();
if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsOpen_Leads_Report["English"]=array();
	$fieldToolTipsOpen_Leads_Report["English"]=array();
	$fieldLabelsOpen_Leads_Report["English"]["Leadid"] = "Leadid";
	$fieldToolTipsOpen_Leads_Report["English"]["Leadid"] = "";
	$fieldLabelsOpen_Leads_Report["English"]["Customer_Name"] = "Customer Name";
	$fieldToolTipsOpen_Leads_Report["English"]["Customer Name"] = "";
	$fieldLabelsOpen_Leads_Report["English"]["Contact_Person"] = "Contact Person";
	$fieldToolTipsOpen_Leads_Report["English"]["Contact Person"] = "";
	$fieldLabelsOpen_Leads_Report["English"]["Lead_Details"] = "Lead Details";
	$fieldToolTipsOpen_Leads_Report["English"]["Lead Details"] = "";
	$fieldLabelsOpen_Leads_Report["English"]["Employee_Name"] = "Employee Name";
	$fieldToolTipsOpen_Leads_Report["English"]["Employee Name"] = "";
	$fieldLabelsOpen_Leads_Report["English"]["Approx_Closure_Date"] = "Approx Closure Date";
	$fieldToolTipsOpen_Leads_Report["English"]["Approx Closure Date"] = "";
	$fieldLabelsOpen_Leads_Report["English"]["Lead_Status"] = "Lead Status";
	$fieldToolTipsOpen_Leads_Report["English"]["Lead Status"] = "";
	$fieldLabelsOpen_Leads_Report["English"]["WIN___Lost_Analysis"] = "WIN / Lost Analysis";
	$fieldToolTipsOpen_Leads_Report["English"]["WIN / Lost Analysis"] = "";
	if (count($fieldToolTipsOpen_Leads_Report["English"])){
		$tdataOpen_Leads_Report[".isUseToolTips"]=true;
	}
}


	
	$tdataOpen_Leads_Report[".NCSearch"]=true;

	

$tdataOpen_Leads_Report[".shortTableName"] = "Open_Leads_Report";
$tdataOpen_Leads_Report[".nSecOptions"] = 0;
$tdataOpen_Leads_Report[".recsPerRowList"] = 1;	
$tdataOpen_Leads_Report[".tableGroupBy"] = "1";
$tdataOpen_Leads_Report[".mainTableOwnerID"] = "";
$tdataOpen_Leads_Report[".moveNext"] = 1;




$tdataOpen_Leads_Report[".showAddInPopup"] = false;

$tdataOpen_Leads_Report[".showEditInPopup"] = false;

$tdataOpen_Leads_Report[".showViewInPopup"] = false;


$tdataOpen_Leads_Report[".fieldsForRegister"] = array();

$tdataOpen_Leads_Report[".listAjax"] = false;

	$tdataOpen_Leads_Report[".audit"] = false;

	$tdataOpen_Leads_Report[".locking"] = false;
	
$tdataOpen_Leads_Report[".listIcons"] = true;
$tdataOpen_Leads_Report[".edit"] = true;
$tdataOpen_Leads_Report[".inlineEdit"] = true;
$tdataOpen_Leads_Report[".view"] = true;

$tdataOpen_Leads_Report[".exportTo"] = true;

$tdataOpen_Leads_Report[".printFriendly"] = true;

$tdataOpen_Leads_Report[".delete"] = true;

$tdataOpen_Leads_Report[".showSimpleSearchOptions"] = false;

$tdataOpen_Leads_Report[".showSearchPanel"] = true;


$tdataOpen_Leads_Report[".isUseAjaxSuggest"] = true;



// button handlers file names

$tdataOpen_Leads_Report[".addPageEvents"] = false;

$tdataOpen_Leads_Report[".arrKeyFields"][] = "Leadid";

// use datepicker for search panel
$tdataOpen_Leads_Report[".isUseCalendarForSearch"] = false;

// use timepicker for search panel
$tdataOpen_Leads_Report[".isUseTimeForSearch"] = false;

$tdataOpen_Leads_Report[".isUseiBox"] = false;



$tdataOpen_Leads_Report[".isUseInlineJs"] = $tdataOpen_Leads_Report[".isUseInlineAdd"] || $tdataOpen_Leads_Report[".isUseInlineEdit"];

$tdataOpen_Leads_Report[".allSearchFields"] = array();

$tdataOpen_Leads_Report[".globSearchFields"][] = "Leadid";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Leadid", $tdataOpen_Leads_Report[".allSearchFields"]))
{
	$tdataOpen_Leads_Report[".allSearchFields"][] = "Leadid";	
}
$tdataOpen_Leads_Report[".globSearchFields"][] = "Customer Name";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Customer Name", $tdataOpen_Leads_Report[".allSearchFields"]))
{
	$tdataOpen_Leads_Report[".allSearchFields"][] = "Customer Name";	
}
$tdataOpen_Leads_Report[".globSearchFields"][] = "Contact Person";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Contact Person", $tdataOpen_Leads_Report[".allSearchFields"]))
{
	$tdataOpen_Leads_Report[".allSearchFields"][] = "Contact Person";	
}
$tdataOpen_Leads_Report[".globSearchFields"][] = "Lead Details";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Lead Details", $tdataOpen_Leads_Report[".allSearchFields"]))
{
	$tdataOpen_Leads_Report[".allSearchFields"][] = "Lead Details";	
}
$tdataOpen_Leads_Report[".globSearchFields"][] = "Approx Closure Date";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Approx Closure Date", $tdataOpen_Leads_Report[".allSearchFields"]))
{
	$tdataOpen_Leads_Report[".allSearchFields"][] = "Approx Closure Date";	
}
$tdataOpen_Leads_Report[".globSearchFields"][] = "Lead Status";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Lead Status", $tdataOpen_Leads_Report[".allSearchFields"]))
{
	$tdataOpen_Leads_Report[".allSearchFields"][] = "Lead Status";	
}
$tdataOpen_Leads_Report[".globSearchFields"][] = "WIN / Lost Analysis";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("WIN / Lost Analysis", $tdataOpen_Leads_Report[".allSearchFields"]))
{
	$tdataOpen_Leads_Report[".allSearchFields"][] = "WIN / Lost Analysis";	
}
$tdataOpen_Leads_Report[".globSearchFields"][] = "Employee Name";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Employee Name", $tdataOpen_Leads_Report[".allSearchFields"]))
{
	$tdataOpen_Leads_Report[".allSearchFields"][] = "Employee Name";	
}


$tdataOpen_Leads_Report[".googleLikeFields"][] = "Leadid";
$tdataOpen_Leads_Report[".googleLikeFields"][] = "Customer Name";
$tdataOpen_Leads_Report[".googleLikeFields"][] = "Contact Person";
$tdataOpen_Leads_Report[".googleLikeFields"][] = "Lead Details";
$tdataOpen_Leads_Report[".googleLikeFields"][] = "Approx Closure Date";
$tdataOpen_Leads_Report[".googleLikeFields"][] = "Lead Status";
$tdataOpen_Leads_Report[".googleLikeFields"][] = "WIN / Lost Analysis";
$tdataOpen_Leads_Report[".googleLikeFields"][] = "Employee Name";



$tdataOpen_Leads_Report[".advSearchFields"][] = "Leadid";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Leadid", $tdataOpen_Leads_Report[".allSearchFields"])) 
{
	$tdataOpen_Leads_Report[".allSearchFields"][] = "Leadid";	
}
$tdataOpen_Leads_Report[".advSearchFields"][] = "Customer Name";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Customer Name", $tdataOpen_Leads_Report[".allSearchFields"])) 
{
	$tdataOpen_Leads_Report[".allSearchFields"][] = "Customer Name";	
}
$tdataOpen_Leads_Report[".advSearchFields"][] = "Contact Person";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Contact Person", $tdataOpen_Leads_Report[".allSearchFields"])) 
{
	$tdataOpen_Leads_Report[".allSearchFields"][] = "Contact Person";	
}
$tdataOpen_Leads_Report[".advSearchFields"][] = "Lead Details";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Lead Details", $tdataOpen_Leads_Report[".allSearchFields"])) 
{
	$tdataOpen_Leads_Report[".allSearchFields"][] = "Lead Details";	
}
$tdataOpen_Leads_Report[".advSearchFields"][] = "Approx Closure Date";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Approx Closure Date", $tdataOpen_Leads_Report[".allSearchFields"])) 
{
	$tdataOpen_Leads_Report[".allSearchFields"][] = "Approx Closure Date";	
}
$tdataOpen_Leads_Report[".advSearchFields"][] = "Lead Status";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Lead Status", $tdataOpen_Leads_Report[".allSearchFields"])) 
{
	$tdataOpen_Leads_Report[".allSearchFields"][] = "Lead Status";	
}
$tdataOpen_Leads_Report[".advSearchFields"][] = "WIN / Lost Analysis";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("WIN / Lost Analysis", $tdataOpen_Leads_Report[".allSearchFields"])) 
{
	$tdataOpen_Leads_Report[".allSearchFields"][] = "WIN / Lost Analysis";	
}
$tdataOpen_Leads_Report[".advSearchFields"][] = "Employee Name";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Employee Name", $tdataOpen_Leads_Report[".allSearchFields"])) 
{
	$tdataOpen_Leads_Report[".allSearchFields"][] = "Employee Name";	
}

$tdataOpen_Leads_Report[".isTableType"] = "report";

$tdataOpen_Leads_Report[".reportGroupFields"] = true;

	

$tdataOpen_Leads_Report[".isDisplayLoading"] = true;

$tdataOpen_Leads_Report[".isResizeColumns"] = false;






$gstrOrderBy = "ORDER BY `Lead Status`";
if(strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy,0,8))!="order by")
	$gstrOrderBy = "order by ".$gstrOrderBy;
$tdataOpen_Leads_Report[".strOrderBy"] = $gstrOrderBy;
	
$tdataOpen_Leads_Report[".orderindexes"] = array();
$tdataOpen_Leads_Report[".orderindexes"][] = array(6, (1 ? "ASC" : "DESC"), "`Lead Status`");

$tdataOpen_Leads_Report[".sqlHead"] = "SELECT Leadid,  `Customer Name`,  `Contact Person`,  `Lead Details`,  `Approx Closure Date`,  `Lead Status`,  `WIN / Lost Analysis`,  `Employee Name`";
$tdataOpen_Leads_Report[".sqlFrom"] = "FROM lead_table";
$tdataOpen_Leads_Report[".sqlWhereExpr"] = "`Lead Status` = \"Suspect\" OR `Lead Status` =\"Prospect\" OR `Lead Status` =\"review\" OR `Lead Status` =\"Hot\" OR `Lead Status` =\"Commit\"";
$tdataOpen_Leads_Report[".sqlTail"] = "GROUP BY Leadid, `Customer Name`, `Contact Person`, `Lead Details`, `Approx Closure Date`, `Lead Status`, `WIN / Lost Analysis`, `Employee Name`";




//fill array of records per page for list and report without group fields
$arrRPP = array();
$arrRPP[] = 10;
$arrRPP[] = 20;
$arrRPP[] = 30;
$arrRPP[] = 50;
$arrRPP[] = 100;
$arrRPP[] = 500;
$arrRPP[] = -1;
$tdataOpen_Leads_Report[".arrRecsPerPage"] = $arrRPP;

//fill array of groups per page for report with group fields
$arrGPP = array();
$arrGPP[] = 1;
$arrGPP[] = 3;
$arrGPP[] = 5;
$arrGPP[] = 10;
$arrGPP[] = 50;
$arrGPP[] = 100;
$arrGPP[] = -1;
$tdataOpen_Leads_Report[".arrGroupsPerPage"] = $arrGPP;

	$tableKeys = array();
	$tableKeys[] = "Leadid";
	$tdataOpen_Leads_Report[".Keys"] = $tableKeys;

//	Leadid
	$fdata = array();
	$fdata["strName"] = "Leadid";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 3;
	
		$fdata["AutoInc"]=true;
	
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Leadid";
	
		$fdata["FullName"]= "Leadid";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 1;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
		
		
		
		
			$tdataOpen_Leads_Report["Leadid"]=$fdata;
//	Customer Name
	$fdata = array();
	$fdata["strName"] = "Customer Name";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Customer_Name";
	
		$fdata["FullName"]= "`Customer Name`";
	
		
		
		
		
		
				$fdata["Index"]= 2;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=100";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
		
		
		
		
			$tdataOpen_Leads_Report["Customer Name"]=$fdata;
//	Contact Person
	$fdata = array();
	$fdata["strName"] = "Contact Person";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Contact_Person";
	
		$fdata["FullName"]= "`Contact Person`";
	
		
		
		
		
		
				$fdata["Index"]= 3;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=45";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
		
		
		
		
			$tdataOpen_Leads_Report["Contact Person"]=$fdata;
//	Lead Details
	$fdata = array();
	$fdata["strName"] = "Lead Details";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Lead_Details";
	
		$fdata["FullName"]= "`Lead Details`";
	
		
		
		
		
		
				$fdata["Index"]= 4;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=250";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
		
		
		
		
			$tdataOpen_Leads_Report["Lead Details"]=$fdata;
//	Approx Closure Date
	$fdata = array();
	$fdata["strName"] = "Approx Closure Date";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Approx_Closure_Date";
	
		$fdata["FullName"]= "`Approx Closure Date`";
	
		
		
		
		
		
				$fdata["Index"]= 5;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=20";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
		
		
		
		
			$tdataOpen_Leads_Report["Approx Closure Date"]=$fdata;
//	Lead Status
	$fdata = array();
	$fdata["strName"] = "Lead Status";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Lead_Status";
	
		$fdata["FullName"]= "`Lead Status`";
	
		
		
		
		
		
				$fdata["Index"]= 6;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=45";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
		
		
		
		
			$tdataOpen_Leads_Report["Lead Status"]=$fdata;
//	WIN / Lost Analysis
	$fdata = array();
	$fdata["strName"] = "WIN / Lost Analysis";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "WIN___Lost_Analysis";
	
		$fdata["FullName"]= "`WIN / Lost Analysis`";
	
		
		
		
		
		
				$fdata["Index"]= 7;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=250";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
		
		
		
		
			$tdataOpen_Leads_Report["WIN / Lost Analysis"]=$fdata;
//	Employee Name
	$fdata = array();
	$fdata["strName"] = "Employee Name";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Employee_Name";
	
		$fdata["FullName"]= "`Employee Name`";
	
		
		
		
		
		
				$fdata["Index"]= 8;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=45";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
		
		
		
		
			$tdataOpen_Leads_Report["Employee Name"]=$fdata;

	
$tables_data["Open Leads Report"]=&$tdataOpen_Leads_Report;
$field_labels["Open_Leads_Report"] = &$fieldLabelsOpen_Leads_Report;
$fieldToolTips["Open Leads Report"] = &$fieldToolTipsOpen_Leads_Report;

// -----------------start  prepare master-details data arrays ------------------------------//
// tables which are detail tables for current table (master)
$detailsTablesData["Open Leads Report"] = array();

	
// tables which are master tables for current table (detail)
$masterTablesData["Open Leads Report"] = array();

// -----------------end  prepare master-details data arrays ------------------------------//

require_once(getabspath("classes/sql.php"));










$proto160=array();
$proto160["m_strHead"] = "SELECT";
$proto160["m_strFieldList"] = "Leadid,  `Customer Name`,  `Contact Person`,  `Lead Details`,  `Approx Closure Date`,  `Lead Status`,  `WIN / Lost Analysis`,  `Employee Name`";
$proto160["m_strFrom"] = "FROM lead_table";
$proto160["m_strWhere"] = "`Lead Status` = \"Suspect\" OR `Lead Status` =\"Prospect\" OR `Lead Status` =\"review\" OR `Lead Status` =\"Hot\" OR `Lead Status` =\"Commit\"";
$proto160["m_strOrderBy"] = "ORDER BY `Lead Status`";
$proto160["m_strTail"] = "GROUP BY Leadid, `Customer Name`, `Contact Person`, `Lead Details`, `Approx Closure Date`, `Lead Status`, `WIN / Lost Analysis`, `Employee Name`";
$proto161=array();
$proto161["m_sql"] = "`Lead Status` = \"Suspect\" OR `Lead Status` =\"Prospect\" OR `Lead Status` =\"review\" OR `Lead Status` =\"Hot\" OR `Lead Status` =\"Commit\"";
$proto161["m_uniontype"] = "SQLL_OR";
	$obj = new SQLNonParsed(array(
	"m_sql" => "`Lead Status` = \"Suspect\" OR `Lead Status` =\"Prospect\" OR `Lead Status` =\"review\" OR `Lead Status` =\"Hot\" OR `Lead Status` =\"Commit\""
));

$proto161["m_column"]=$obj;
$proto161["m_contained"] = array();
						$proto163=array();
$proto163["m_sql"] = "`Lead Status` = \"Suspect\"";
$proto163["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "Lead Status",
	"m_strTable" => "lead_table"
));

$proto163["m_column"]=$obj;
$proto163["m_contained"] = array();
$proto163["m_strCase"] = "= \"Suspect\"";
$proto163["m_havingmode"] = "0";
$proto163["m_inBrackets"] = "0";
$proto163["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto163);

			$proto161["m_contained"][]=$obj;
						$proto165=array();
$proto165["m_sql"] = "`Lead Status` =\"Prospect\"";
$proto165["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "Lead Status",
	"m_strTable" => "lead_table"
));

$proto165["m_column"]=$obj;
$proto165["m_contained"] = array();
$proto165["m_strCase"] = "=\"Prospect\"";
$proto165["m_havingmode"] = "0";
$proto165["m_inBrackets"] = "0";
$proto165["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto165);

			$proto161["m_contained"][]=$obj;
						$proto167=array();
$proto167["m_sql"] = "`Lead Status` =\"review\"";
$proto167["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "Lead Status",
	"m_strTable" => "lead_table"
));

$proto167["m_column"]=$obj;
$proto167["m_contained"] = array();
$proto167["m_strCase"] = "=\"review\"";
$proto167["m_havingmode"] = "0";
$proto167["m_inBrackets"] = "0";
$proto167["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto167);

			$proto161["m_contained"][]=$obj;
						$proto169=array();
$proto169["m_sql"] = "`Lead Status` =\"Hot\"";
$proto169["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "Lead Status",
	"m_strTable" => "lead_table"
));

$proto169["m_column"]=$obj;
$proto169["m_contained"] = array();
$proto169["m_strCase"] = "=\"Hot\"";
$proto169["m_havingmode"] = "0";
$proto169["m_inBrackets"] = "0";
$proto169["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto169);

			$proto161["m_contained"][]=$obj;
						$proto171=array();
$proto171["m_sql"] = "`Lead Status` =\"Commit\"";
$proto171["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "Lead Status",
	"m_strTable" => "lead_table"
));

$proto171["m_column"]=$obj;
$proto171["m_contained"] = array();
$proto171["m_strCase"] = "=\"Commit\"";
$proto171["m_havingmode"] = "0";
$proto171["m_inBrackets"] = "0";
$proto171["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto171);

			$proto161["m_contained"][]=$obj;
$proto161["m_strCase"] = "";
$proto161["m_havingmode"] = "0";
$proto161["m_inBrackets"] = "0";
$proto161["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto161);

$proto160["m_where"] = $obj;
$proto173=array();
$proto173["m_sql"] = "";
$proto173["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto173["m_column"]=$obj;
$proto173["m_contained"] = array();
$proto173["m_strCase"] = "";
$proto173["m_havingmode"] = "0";
$proto173["m_inBrackets"] = "0";
$proto173["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto173);

$proto160["m_having"] = $obj;
$proto160["m_fieldlist"] = array();
						$proto175=array();
			$obj = new SQLField(array(
	"m_strName" => "Leadid",
	"m_strTable" => "lead_table"
));

$proto175["m_expr"]=$obj;
$proto175["m_alias"] = "";
$obj = new SQLFieldListItem($proto175);

$proto160["m_fieldlist"][]=$obj;
						$proto177=array();
			$obj = new SQLField(array(
	"m_strName" => "Customer Name",
	"m_strTable" => "lead_table"
));

$proto177["m_expr"]=$obj;
$proto177["m_alias"] = "";
$obj = new SQLFieldListItem($proto177);

$proto160["m_fieldlist"][]=$obj;
						$proto179=array();
			$obj = new SQLField(array(
	"m_strName" => "Contact Person",
	"m_strTable" => "lead_table"
));

$proto179["m_expr"]=$obj;
$proto179["m_alias"] = "";
$obj = new SQLFieldListItem($proto179);

$proto160["m_fieldlist"][]=$obj;
						$proto181=array();
			$obj = new SQLField(array(
	"m_strName" => "Lead Details",
	"m_strTable" => "lead_table"
));

$proto181["m_expr"]=$obj;
$proto181["m_alias"] = "";
$obj = new SQLFieldListItem($proto181);

$proto160["m_fieldlist"][]=$obj;
						$proto183=array();
			$obj = new SQLField(array(
	"m_strName" => "Approx Closure Date",
	"m_strTable" => "lead_table"
));

$proto183["m_expr"]=$obj;
$proto183["m_alias"] = "";
$obj = new SQLFieldListItem($proto183);

$proto160["m_fieldlist"][]=$obj;
						$proto185=array();
			$obj = new SQLField(array(
	"m_strName" => "Lead Status",
	"m_strTable" => "lead_table"
));

$proto185["m_expr"]=$obj;
$proto185["m_alias"] = "";
$obj = new SQLFieldListItem($proto185);

$proto160["m_fieldlist"][]=$obj;
						$proto187=array();
			$obj = new SQLField(array(
	"m_strName" => "WIN / Lost Analysis",
	"m_strTable" => "lead_table"
));

$proto187["m_expr"]=$obj;
$proto187["m_alias"] = "";
$obj = new SQLFieldListItem($proto187);

$proto160["m_fieldlist"][]=$obj;
						$proto189=array();
			$obj = new SQLField(array(
	"m_strName" => "Employee Name",
	"m_strTable" => "lead_table"
));

$proto189["m_expr"]=$obj;
$proto189["m_alias"] = "";
$obj = new SQLFieldListItem($proto189);

$proto160["m_fieldlist"][]=$obj;
$proto160["m_fromlist"] = array();
												$proto191=array();
$proto191["m_link"] = "SQLL_MAIN";
			$proto192=array();
$proto192["m_strName"] = "lead_table";
$proto192["m_columns"] = array();
$proto192["m_columns"][] = "Leadid";
$proto192["m_columns"][] = "Region";
$proto192["m_columns"][] = "Customer Name";
$proto192["m_columns"][] = "Contact Person";
$proto192["m_columns"][] = "Lead Details";
$proto192["m_columns"][] = "Employee Name";
$proto192["m_columns"][] = "Approx Closure Date";
$proto192["m_columns"][] = "Lead Status";
$proto192["m_columns"][] = "Manager Name";
$proto192["m_columns"][] = "Manager Remarks";
$proto192["m_columns"][] = "Sales Call Status";
$proto192["m_columns"][] = "Lead Level";
$proto192["m_columns"][] = "Requirement Details";
$proto192["m_columns"][] = "Approx Value";
$proto192["m_columns"][] = "First Quote Remarks";
$proto192["m_columns"][] = "Proposed Closure Date";
$proto192["m_columns"][] = "Projected Closure QTR";
$proto192["m_columns"][] = "Proposed Solution Details";
$proto192["m_columns"][] = "Quoted Price";
$proto192["m_columns"][] = "Final Quote Remarks";
$proto192["m_columns"][] = "Discussion Highlights";
$proto192["m_columns"][] = "WIN / Lost Analysis";
$obj = new SQLTable($proto192);

$proto191["m_table"] = $obj;
$proto191["m_alias"] = "";
$proto193=array();
$proto193["m_sql"] = "";
$proto193["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto193["m_column"]=$obj;
$proto193["m_contained"] = array();
$proto193["m_strCase"] = "";
$proto193["m_havingmode"] = "0";
$proto193["m_inBrackets"] = "0";
$proto193["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto193);

$proto191["m_joinon"] = $obj;
$obj = new SQLFromListItem($proto191);

$proto160["m_fromlist"][]=$obj;
$proto160["m_groupby"] = array();
												$proto195=array();
						$obj = new SQLField(array(
	"m_strName" => "Leadid",
	"m_strTable" => "lead_table"
));

$proto195["m_column"]=$obj;
$obj = new SQLGroupByItem($proto195);

$proto160["m_groupby"][]=$obj;
												$proto197=array();
						$obj = new SQLField(array(
	"m_strName" => "Customer Name",
	"m_strTable" => "lead_table"
));

$proto197["m_column"]=$obj;
$obj = new SQLGroupByItem($proto197);

$proto160["m_groupby"][]=$obj;
												$proto199=array();
						$obj = new SQLField(array(
	"m_strName" => "Contact Person",
	"m_strTable" => "lead_table"
));

$proto199["m_column"]=$obj;
$obj = new SQLGroupByItem($proto199);

$proto160["m_groupby"][]=$obj;
												$proto201=array();
						$obj = new SQLField(array(
	"m_strName" => "Lead Details",
	"m_strTable" => "lead_table"
));

$proto201["m_column"]=$obj;
$obj = new SQLGroupByItem($proto201);

$proto160["m_groupby"][]=$obj;
												$proto203=array();
						$obj = new SQLField(array(
	"m_strName" => "Approx Closure Date",
	"m_strTable" => "lead_table"
));

$proto203["m_column"]=$obj;
$obj = new SQLGroupByItem($proto203);

$proto160["m_groupby"][]=$obj;
												$proto205=array();
						$obj = new SQLField(array(
	"m_strName" => "Lead Status",
	"m_strTable" => "lead_table"
));

$proto205["m_column"]=$obj;
$obj = new SQLGroupByItem($proto205);

$proto160["m_groupby"][]=$obj;
												$proto207=array();
						$obj = new SQLField(array(
	"m_strName" => "WIN / Lost Analysis",
	"m_strTable" => "lead_table"
));

$proto207["m_column"]=$obj;
$obj = new SQLGroupByItem($proto207);

$proto160["m_groupby"][]=$obj;
												$proto209=array();
						$obj = new SQLField(array(
	"m_strName" => "Employee Name",
	"m_strTable" => "lead_table"
));

$proto209["m_column"]=$obj;
$obj = new SQLGroupByItem($proto209);

$proto160["m_groupby"][]=$obj;
$proto160["m_orderby"] = array();
												$proto211=array();
						$obj = new SQLField(array(
	"m_strName" => "Lead Status",
	"m_strTable" => "lead_table"
));

$proto211["m_column"]=$obj;
$proto211["m_bAsc"] = 1;
$proto211["m_nColumn"] = 0;
$obj = new SQLOrderByItem($proto211);

$proto160["m_orderby"][]=$obj;					
$obj = new SQLQuery($proto160);

$queryData_Open_Leads_Report = $obj;
$tdataOpen_Leads_Report[".sqlquery"] = $queryData_Open_Leads_Report;

$tableEvents["Open Leads Report"] = new eventsBase;

?>
