<?php
$tdataVisit_Report=array();
	$tdataVisit_Report[".NumberOfChars"]=80; 
	$tdataVisit_Report[".ShortName"]="Visit_Report";
	$tdataVisit_Report[".OwnerID"]="Region";
	$tdataVisit_Report[".OriginalTable"]="visit_register";


	
//	field labels
$fieldLabelsVisit_Report = array();
if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsVisit_Report["English"]=array();
	$fieldToolTipsVisit_Report["English"]=array();
	$fieldLabelsVisit_Report["English"]["Employee_Name"] = "Employee Name";
	$fieldToolTipsVisit_Report["English"]["Employee Name"] = "";
	$fieldLabelsVisit_Report["English"]["Customer_Name"] = "Customer Name";
	$fieldToolTipsVisit_Report["English"]["Customer Name"] = "";
	$fieldLabelsVisit_Report["English"]["Contact_Person"] = "Contact Person";
	$fieldToolTipsVisit_Report["English"]["Contact Person"] = "";
	$fieldLabelsVisit_Report["English"]["Purpose_Of_Visit"] = "Purpose Of Visit";
	$fieldToolTipsVisit_Report["English"]["Purpose Of Visit"] = "";
	$fieldLabelsVisit_Report["English"]["MOM_Summary"] = "MOM Summary";
	$fieldToolTipsVisit_Report["English"]["MOM Summary"] = "";
	$fieldLabelsVisit_Report["English"]["Visit_Status"] = "Visit Status";
	$fieldToolTipsVisit_Report["English"]["Visit Status"] = "";
	$fieldLabelsVisit_Report["English"]["Date"] = "Date";
	$fieldToolTipsVisit_Report["English"]["Date"] = "";
	$fieldLabelsVisit_Report["English"]["Nos"] = "Nos";
	$fieldToolTipsVisit_Report["English"]["Nos"] = "";
	$fieldLabelsVisit_Report["English"]["Region"] = "Region";
	$fieldToolTipsVisit_Report["English"]["Region"] = "";
	if (count($fieldToolTipsVisit_Report["English"])){
		$tdataVisit_Report[".isUseToolTips"]=true;
	}
}


	
	$tdataVisit_Report[".NCSearch"]=true;

	

$tdataVisit_Report[".shortTableName"] = "Visit_Report";
$tdataVisit_Report[".nSecOptions"] = 1;
$tdataVisit_Report[".recsPerRowList"] = 1;	
$tdataVisit_Report[".tableGroupBy"] = "1";
$tdataVisit_Report[".mainTableOwnerID"] = "Region";
$tdataVisit_Report[".moveNext"] = 1;




$tdataVisit_Report[".showAddInPopup"] = false;

$tdataVisit_Report[".showEditInPopup"] = false;

$tdataVisit_Report[".showViewInPopup"] = false;


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

$tdataVisit_Report[".listAjax"] = false;

	$tdataVisit_Report[".audit"] = false;

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

$tdataVisit_Report[".exportTo"] = true;

$tdataVisit_Report[".printFriendly"] = true;

$tdataVisit_Report[".delete"] = true;

$tdataVisit_Report[".showSimpleSearchOptions"] = false;

$tdataVisit_Report[".showSearchPanel"] = true;


$tdataVisit_Report[".isUseAjaxSuggest"] = true;



// button handlers file names

$tdataVisit_Report[".addPageEvents"] = false;


// use datepicker for search panel
$tdataVisit_Report[".isUseCalendarForSearch"] = true;

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

$tdataVisit_Report[".isUseiBox"] = false;



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

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

$tdataVisit_Report[".globSearchFields"][] = "Nos";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Nos", $tdataVisit_Report[".allSearchFields"]))
{
	$tdataVisit_Report[".allSearchFields"][] = "Nos";	
}
$tdataVisit_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", $tdataVisit_Report[".allSearchFields"]))
{
	$tdataVisit_Report[".allSearchFields"][] = "Employee Name";	
}
$tdataVisit_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", $tdataVisit_Report[".allSearchFields"]))
{
	$tdataVisit_Report[".allSearchFields"][] = "Customer Name";	
}
$tdataVisit_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", $tdataVisit_Report[".allSearchFields"]))
{
	$tdataVisit_Report[".allSearchFields"][] = "Contact Person";	
}
$tdataVisit_Report[".globSearchFields"][] = "Purpose Of Visit";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Purpose Of Visit", $tdataVisit_Report[".allSearchFields"]))
{
	$tdataVisit_Report[".allSearchFields"][] = "Purpose Of Visit";	
}
$tdataVisit_Report[".globSearchFields"][] = "MOM Summary";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("MOM Summary", $tdataVisit_Report[".allSearchFields"]))
{
	$tdataVisit_Report[".allSearchFields"][] = "MOM Summary";	
}
$tdataVisit_Report[".globSearchFields"][] = "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("Date", $tdataVisit_Report[".allSearchFields"]))
{
	$tdataVisit_Report[".allSearchFields"][] = "Date";	
}
$tdataVisit_Report[".globSearchFields"][] = "Visit 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("Visit Status", $tdataVisit_Report[".allSearchFields"]))
{
	$tdataVisit_Report[".allSearchFields"][] = "Visit Status";	
}
$tdataVisit_Report[".globSearchFields"][] = "Region";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Region", $tdataVisit_Report[".allSearchFields"]))
{
	$tdataVisit_Report[".allSearchFields"][] = "Region";	
}


$tdataVisit_Report[".googleLikeFields"][] = "Nos";
$tdataVisit_Report[".googleLikeFields"][] = "Employee Name";
$tdataVisit_Report[".googleLikeFields"][] = "Customer Name";
$tdataVisit_Report[".googleLikeFields"][] = "Contact Person";
$tdataVisit_Report[".googleLikeFields"][] = "Purpose Of Visit";
$tdataVisit_Report[".googleLikeFields"][] = "MOM Summary";
$tdataVisit_Report[".googleLikeFields"][] = "Date";
$tdataVisit_Report[".googleLikeFields"][] = "Visit Status";
$tdataVisit_Report[".googleLikeFields"][] = "Region";

$tdataVisit_Report[".panelSearchFields"][] = "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("Date", $tdataVisit_Report[".allSearchFields"])) 
{
	$tdataVisit_Report[".allSearchFields"][] = "Date";	
}


$tdataVisit_Report[".advSearchFields"][] = "Nos";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Nos", $tdataVisit_Report[".allSearchFields"])) 
{
	$tdataVisit_Report[".allSearchFields"][] = "Nos";	
}
$tdataVisit_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", $tdataVisit_Report[".allSearchFields"])) 
{
	$tdataVisit_Report[".allSearchFields"][] = "Employee Name";	
}
$tdataVisit_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", $tdataVisit_Report[".allSearchFields"])) 
{
	$tdataVisit_Report[".allSearchFields"][] = "Customer Name";	
}
$tdataVisit_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", $tdataVisit_Report[".allSearchFields"])) 
{
	$tdataVisit_Report[".allSearchFields"][] = "Contact Person";	
}
$tdataVisit_Report[".advSearchFields"][] = "Purpose Of Visit";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Purpose Of Visit", $tdataVisit_Report[".allSearchFields"])) 
{
	$tdataVisit_Report[".allSearchFields"][] = "Purpose Of Visit";	
}
$tdataVisit_Report[".advSearchFields"][] = "MOM Summary";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("MOM Summary", $tdataVisit_Report[".allSearchFields"])) 
{
	$tdataVisit_Report[".allSearchFields"][] = "MOM Summary";	
}
$tdataVisit_Report[".advSearchFields"][] = "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("Date", $tdataVisit_Report[".allSearchFields"])) 
{
	$tdataVisit_Report[".allSearchFields"][] = "Date";	
}
$tdataVisit_Report[".advSearchFields"][] = "Visit 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("Visit Status", $tdataVisit_Report[".allSearchFields"])) 
{
	$tdataVisit_Report[".allSearchFields"][] = "Visit Status";	
}
$tdataVisit_Report[".advSearchFields"][] = "Region";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Region", $tdataVisit_Report[".allSearchFields"])) 
{
	$tdataVisit_Report[".allSearchFields"][] = "Region";	
}

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

$tdataVisit_Report[".reportGroupFields"] = true;

	

$tdataVisit_Report[".isDisplayLoading"] = true;

$tdataVisit_Report[".isResizeColumns"] = false;


$tdataVisit_Report[".noRecordsFirstPage"] = true;




$gstrOrderBy = "ORDER BY Date(visit_register.`Date Of Visit`) DESC";
if(strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy,0,8))!="order by")
	$gstrOrderBy = "order by ".$gstrOrderBy;
$tdataVisit_Report[".strOrderBy"] = $gstrOrderBy;
	
$tdataVisit_Report[".orderindexes"] = array();
$tdataVisit_Report[".orderindexes"][] = array(7, (0 ? "ASC" : "DESC"), "Date(visit_register.`Date Of Visit`)");

$tdataVisit_Report[".sqlHead"] = "SELECT COUNT(visit_register.idvisit_register) AS Nos,  visit_register.`Employee Name`,  visit_register.`Customer Name`,  visit_register.`Contact Person`,  visit_register.`Purpose Of Visit`,  visit_register.`MOM Summary`,  Date(visit_register.`Date Of Visit`) AS `Date`,  visit_register.`Visit Status`,  customer_list.Region";
$tdataVisit_Report[".sqlFrom"] = "FROM visit_register  INNER JOIN customer_list ON visit_register.`Customer Name` = customer_list.`Customer Name`";
$tdataVisit_Report[".sqlWhereExpr"] = "";
$tdataVisit_Report[".sqlTail"] = "GROUP BY visit_register.`Employee Name`, visit_register.`Customer Name`, visit_register.`Contact Person`, visit_register.`Purpose Of Visit`, visit_register.`MOM Summary`, Date(visit_register.`Date Of Visit`), visit_register.`Visit Status`";




//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;
$tdataVisit_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;
$tdataVisit_Report[".arrGroupsPerPage"] = $arrGPP;

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

//	Nos
	$fdata = array();
	$fdata["strName"] = "Nos";
	$fdata["ownerTable"] = "";
		
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Nos";
	
		$fdata["FullName"]= "COUNT(visit_register.idvisit_register)";
	
		
		
		
		
		
				$fdata["Index"]= 1;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		
		$fdata["bInlineAdd"]=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");	
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
		
		
		
		
			$tdataVisit_Report["Nos"]=$fdata;
//	Employee Name
	$fdata = array();
	$fdata["strName"] = "Employee Name";
	$fdata["ownerTable"] = "visit_register";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Employee_Name";
	
		$fdata["FullName"]= "visit_register.`Employee Name`";
	
		
		
		
		
		
				$fdata["Index"]= 2;
				$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;
	
		
		
		
		
		
			$tdataVisit_Report["Employee Name"]=$fdata;
//	Customer Name
	$fdata = array();
	$fdata["strName"] = "Customer Name";
	$fdata["ownerTable"] = "visit_register";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Customer_Name";
	
		$fdata["FullName"]= "visit_register.`Customer Name`";
	
		
		
		
		
		
				$fdata["Index"]= 3;
				$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;
	
		
		
		
		
		
			$tdataVisit_Report["Customer Name"]=$fdata;
//	Contact Person
	$fdata = array();
	$fdata["strName"] = "Contact Person";
	$fdata["ownerTable"] = "visit_register";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Contact_Person";
	
		$fdata["FullName"]= "visit_register.`Contact Person`";
	
		
		
		
		
		
				$fdata["Index"]= 4;
				$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;
	
		
		
		
		
		
			$tdataVisit_Report["Contact Person"]=$fdata;
//	Purpose Of Visit
	$fdata = array();
	$fdata["strName"] = "Purpose Of Visit";
	$fdata["ownerTable"] = "visit_register";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Purpose_Of_Visit";
	
		$fdata["FullName"]= "visit_register.`Purpose Of Visit`";
	
		
		
		
		
		
				$fdata["Index"]= 5;
				$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;
	
		
		
		
		
		
			$tdataVisit_Report["Purpose Of Visit"]=$fdata;
//	MOM Summary
	$fdata = array();
	$fdata["strName"] = "MOM Summary";
	$fdata["ownerTable"] = "visit_register";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "MOM_Summary";
	
		$fdata["FullName"]= "visit_register.`MOM Summary`";
	
		
		
		
		
		
				$fdata["Index"]= 6;
				$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;
	
		
		
		
		
		
			$tdataVisit_Report["MOM Summary"]=$fdata;
//	Date
	$fdata = array();
	$fdata["strName"] = "Date";
	$fdata["ownerTable"] = "";
		
		
		
	$fdata["FieldType"]= 135;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Date";
	$fdata["ViewFormat"]= "Short Date";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Date";
	
		$fdata["FullName"]= "Date(visit_register.`Date Of Visit`)";
	
		
		
		
		
		
				$fdata["Index"]= 7;
		$fdata["DateEditType"] = 13; 
	$fdata["InitialYearFactor"] = 100; 
	$fdata["LastYearFactor"] = 10; 
			
		$fdata["bListPage"]=true; 
	
		
		$fdata["bInlineAdd"]=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;
	
		
		
		
		
		
			$tdataVisit_Report["Date"]=$fdata;
//	Visit Status
	$fdata = array();
	$fdata["strName"] = "Visit Status";
	$fdata["ownerTable"] = "visit_register";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Visit_Status";
	
		$fdata["FullName"]= "visit_register.`Visit Status`";
	
		
		
		
		
		
				$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;
	
		
		
		
		
		
			$tdataVisit_Report["Visit Status"]=$fdata;
//	Region
	$fdata = array();
	$fdata["strName"] = "Region";
	$fdata["ownerTable"] = "customer_list";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Region";
	
		$fdata["FullName"]= "customer_list.Region";
	
		
		
		
		
		
				$fdata["Index"]= 9;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		
		
		
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				
		
		
		
		
		
			$tdataVisit_Report["Region"]=$fdata;

	
$tables_data["Visit Report"]=&$tdataVisit_Report;
$field_labels["Visit_Report"] = &$fieldLabelsVisit_Report;
$fieldToolTips["Visit Report"] = &$fieldToolTipsVisit_Report;

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

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

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

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










$proto53=array();
$proto53["m_strHead"] = "SELECT";
$proto53["m_strFieldList"] = "COUNT(visit_register.idvisit_register) AS Nos,  visit_register.`Employee Name`,  visit_register.`Customer Name`,  visit_register.`Contact Person`,  visit_register.`Purpose Of Visit`,  visit_register.`MOM Summary`,  Date(visit_register.`Date Of Visit`) AS `Date`,  visit_register.`Visit Status`,  customer_list.Region";
$proto53["m_strFrom"] = "FROM visit_register  INNER JOIN customer_list ON visit_register.`Customer Name` = customer_list.`Customer Name`";
$proto53["m_strWhere"] = "";
$proto53["m_strOrderBy"] = "ORDER BY Date(visit_register.`Date Of Visit`) DESC";
$proto53["m_strTail"] = "GROUP BY visit_register.`Employee Name`, visit_register.`Customer Name`, visit_register.`Contact Person`, visit_register.`Purpose Of Visit`, visit_register.`MOM Summary`, Date(visit_register.`Date Of Visit`), visit_register.`Visit Status`";
$proto54=array();
$proto54["m_sql"] = "";
$proto54["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

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

$proto53["m_having"] = $obj;
$proto53["m_fieldlist"] = array();
						$proto58=array();
			$proto59=array();
$proto59["m_functiontype"] = "SQLF_COUNT";
$proto59["m_arguments"] = array();
						$obj = new SQLField(array(
	"m_strName" => "idvisit_register",
	"m_strTable" => "visit_register"
));

$proto59["m_arguments"][]=$obj;
$proto59["m_strFunctionName"] = "COUNT";
$obj = new SQLFunctionCall($proto59);

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

$proto53["m_fieldlist"][]=$obj;
						$proto61=array();
			$obj = new SQLField(array(
	"m_strName" => "Employee Name",
	"m_strTable" => "visit_register"
));

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

$proto53["m_fieldlist"][]=$obj;
						$proto63=array();
			$obj = new SQLField(array(
	"m_strName" => "Customer Name",
	"m_strTable" => "visit_register"
));

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

$proto53["m_fieldlist"][]=$obj;
						$proto65=array();
			$obj = new SQLField(array(
	"m_strName" => "Contact Person",
	"m_strTable" => "visit_register"
));

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

$proto53["m_fieldlist"][]=$obj;
						$proto67=array();
			$obj = new SQLField(array(
	"m_strName" => "Purpose Of Visit",
	"m_strTable" => "visit_register"
));

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

$proto53["m_fieldlist"][]=$obj;
						$proto69=array();
			$obj = new SQLField(array(
	"m_strName" => "MOM Summary",
	"m_strTable" => "visit_register"
));

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

$proto53["m_fieldlist"][]=$obj;
						$proto71=array();
			$proto72=array();
$proto72["m_functiontype"] = "SQLF_CUSTOM";
$proto72["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "visit_register.`Date Of Visit`"
));

$proto72["m_arguments"][]=$obj;
$proto72["m_strFunctionName"] = "Date";
$obj = new SQLFunctionCall($proto72);

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

$proto53["m_fieldlist"][]=$obj;
						$proto74=array();
			$obj = new SQLField(array(
	"m_strName" => "Visit Status",
	"m_strTable" => "visit_register"
));

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

$proto53["m_fieldlist"][]=$obj;
						$proto76=array();
			$obj = new SQLField(array(
	"m_strName" => "Region",
	"m_strTable" => "customer_list"
));

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

$proto53["m_fieldlist"][]=$obj;
$proto53["m_fromlist"] = array();
												$proto78=array();
$proto78["m_link"] = "SQLL_MAIN";
			$proto79=array();
$proto79["m_strName"] = "visit_register";
$proto79["m_columns"] = array();
$proto79["m_columns"][] = "idvisit_register";
$proto79["m_columns"][] = "Lead_ID";
$proto79["m_columns"][] = "Recorded Date";
$proto79["m_columns"][] = "Employee Name";
$proto79["m_columns"][] = "Customer Name";
$proto79["m_columns"][] = "Contact Person";
$proto79["m_columns"][] = "Purpose Of Visit";
$proto79["m_columns"][] = "MOM Summary";
$proto79["m_columns"][] = "Voucher Status";
$proto79["m_columns"][] = "Date Of Visit";
$proto79["m_columns"][] = "Mode Of Travel";
$proto79["m_columns"][] = "Travel Expense";
$proto79["m_columns"][] = "Expense Remarks";
$proto79["m_columns"][] = "Visit Status";
$proto79["m_columns"][] = "Reporting Manager";
$proto79["m_columns"][] = "Approved Expense";
$proto79["m_columns"][] = "Approved Date";
$proto79["m_columns"][] = "Voucher Processed Date";
$proto79["m_columns"][] = "Expense Claim Date";
$obj = new SQLTable($proto79);

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

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

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

$proto53["m_fromlist"][]=$obj;
												$proto82=array();
$proto82["m_link"] = "SQLL_INNERJOIN";
			$proto83=array();
$proto83["m_strName"] = "customer_list";
$proto83["m_columns"] = array();
$proto83["m_columns"][] = "idCL";
$proto83["m_columns"][] = "Created on";
$proto83["m_columns"][] = "Region";
$proto83["m_columns"][] = "Customer Name";
$proto83["m_columns"][] = "Address";
$proto83["m_columns"][] = "City";
$proto83["m_columns"][] = "State";
$proto83["m_columns"][] = "Country";
$proto83["m_columns"][] = "Postal Code";
$proto83["m_columns"][] = "Web address";
$proto83["m_columns"][] = "Area";
$proto83["m_columns"][] = "Customer_Category";
$proto83["m_columns"][] = "Breif About the Company";
$proto83["m_columns"][] = "Existing Setup";
$proto83["m_columns"][] = "Interaction Summary";
$proto83["m_columns"][] = "Commercial Summary";
$proto83["m_columns"][] = "Customer Status";
$proto83["m_columns"][] = "Assigned Executive";
$proto83["m_columns"][] = "Assigned Date";
$proto83["m_columns"][] = "Last Updated on";
$obj = new SQLTable($proto83);

$proto82["m_table"] = $obj;
$proto82["m_alias"] = "";
$proto84=array();
$proto84["m_sql"] = "visit_register.`Customer Name` = customer_list.`Customer Name`";
$proto84["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "Customer Name",
	"m_strTable" => "visit_register"
));

$proto84["m_column"]=$obj;
$proto84["m_contained"] = array();
$proto84["m_strCase"] = "= customer_list.`Customer Name`";
$proto84["m_havingmode"] = "0";
$proto84["m_inBrackets"] = "0";
$proto84["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto84);

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

$proto53["m_fromlist"][]=$obj;
$proto53["m_groupby"] = array();
												$proto86=array();
						$obj = new SQLField(array(
	"m_strName" => "Employee Name",
	"m_strTable" => "visit_register"
));

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

$proto53["m_groupby"][]=$obj;
												$proto88=array();
						$obj = new SQLField(array(
	"m_strName" => "Customer Name",
	"m_strTable" => "visit_register"
));

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

$proto53["m_groupby"][]=$obj;
												$proto90=array();
						$obj = new SQLField(array(
	"m_strName" => "Contact Person",
	"m_strTable" => "visit_register"
));

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

$proto53["m_groupby"][]=$obj;
												$proto92=array();
						$obj = new SQLField(array(
	"m_strName" => "Purpose Of Visit",
	"m_strTable" => "visit_register"
));

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

$proto53["m_groupby"][]=$obj;
												$proto94=array();
						$obj = new SQLField(array(
	"m_strName" => "MOM Summary",
	"m_strTable" => "visit_register"
));

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

$proto53["m_groupby"][]=$obj;
												$proto96=array();
						$proto97=array();
$proto97["m_functiontype"] = "SQLF_CUSTOM";
$proto97["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "visit_register.`Date Of Visit`"
));

$proto97["m_arguments"][]=$obj;
$proto97["m_strFunctionName"] = "Date";
$obj = new SQLFunctionCall($proto97);

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

$proto53["m_groupby"][]=$obj;
												$proto99=array();
						$obj = new SQLField(array(
	"m_strName" => "Visit Status",
	"m_strTable" => "visit_register"
));

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

$proto53["m_groupby"][]=$obj;
$proto53["m_orderby"] = array();
												$proto101=array();
						$proto102=array();
$proto102["m_functiontype"] = "SQLF_CUSTOM";
$proto102["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "visit_register.`Date Of Visit`"
));

$proto102["m_arguments"][]=$obj;
$proto102["m_strFunctionName"] = "Date";
$obj = new SQLFunctionCall($proto102);

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

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

$queryData_Visit_Report = $obj;
$tdataVisit_Report[".sqlquery"] = $queryData_Visit_Report;

$tableEvents["Visit Report"] = new eventsBase;

?>
