HEX
Server: Apache
System: Linux darrell.nocdirect.com 4.18.0-513.18.2.el8_9.x86_64 #1 SMP Sat Mar 30 06:10:41 EDT 2024 x86_64
User: joderbya (1358)
PHP: 8.0.30
Disabled: NONE
Upload Files
File: /home/joderbya/wlsa.quick-step-ei.com2/include/reports_Report_settings.php
<?php
require_once(getabspath("classes/cipherer.php"));




$tdatareports_Report = array();
	$tdatareports_Report[".truncateText"] = true;
	$tdatareports_Report[".NumberOfChars"] = 80;
	$tdatareports_Report[".ShortName"] = "reports_Report";
	$tdatareports_Report[".OwnerID"] = "";
	$tdatareports_Report[".OriginalTable"] = "reports";

//	field labels
$fieldLabelsreports_Report = array();
$fieldToolTipsreports_Report = array();
$pageTitlesreports_Report = array();
$placeHoldersreports_Report = array();

if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsreports_Report["English"] = array();
	$fieldToolTipsreports_Report["English"] = array();
	$placeHoldersreports_Report["English"] = array();
	$pageTitlesreports_Report["English"] = array();
	$fieldLabelsreports_Report["English"]["Bairro"] = "Bairro";
	$fieldToolTipsreports_Report["English"]["Bairro"] = "";
	$placeHoldersreports_Report["English"]["Bairro"] = "";
	$fieldLabelsreports_Report["English"]["Sexual"] = "Sexual";
	$fieldToolTipsreports_Report["English"]["Sexual"] = "";
	$placeHoldersreports_Report["English"]["Sexual"] = "";
	$fieldLabelsreports_Report["English"]["F_sica"] = "Física";
	$fieldToolTipsreports_Report["English"]["F_sica"] = "";
	$placeHoldersreports_Report["English"]["F_sica"] = "";
	$fieldLabelsreports_Report["English"]["Psicol_gica"] = "Psicológica";
	$fieldToolTipsreports_Report["English"]["Psicol_gica"] = "";
	$placeHoldersreports_Report["English"]["Psicol_gica"] = "";
	$fieldLabelsreports_Report["English"]["Dom_stica"] = "Doméstica";
	$fieldToolTipsreports_Report["English"]["Dom_stica"] = "";
	$placeHoldersreports_Report["English"]["Dom_stica"] = "";
	$fieldLabelsreports_Report["English"]["Moral"] = "Moral";
	$fieldToolTipsreports_Report["English"]["Moral"] = "";
	$placeHoldersreports_Report["English"]["Moral"] = "";
	$fieldLabelsreports_Report["English"]["Institucional"] = "Institucional";
	$fieldToolTipsreports_Report["English"]["Institucional"] = "";
	$placeHoldersreports_Report["English"]["Institucional"] = "";
	$fieldLabelsreports_Report["English"]["Vitimas"] = "Vitimas";
	$fieldToolTipsreports_Report["English"]["Vitimas"] = "";
	$placeHoldersreports_Report["English"]["Vitimas"] = "";
	if (count($fieldToolTipsreports_Report["English"]))
		$tdatareports_Report[".isUseToolTips"] = true;
}
if(mlang_getcurrentlang()=="")
{
	$fieldLabelsreports_Report[""] = array();
	$fieldToolTipsreports_Report[""] = array();
	$placeHoldersreports_Report[""] = array();
	$pageTitlesreports_Report[""] = array();
	$fieldLabelsreports_Report[""]["Bairro"] = "Bairro";
	$fieldToolTipsreports_Report[""]["Bairro"] = "";
	$placeHoldersreports_Report[""]["Bairro"] = "";
	$fieldLabelsreports_Report[""]["Sexual"] = "Sexual";
	$fieldToolTipsreports_Report[""]["Sexual"] = "";
	$placeHoldersreports_Report[""]["Sexual"] = "";
	$fieldLabelsreports_Report[""]["F_sica"] = "Física";
	$fieldToolTipsreports_Report[""]["F_sica"] = "";
	$placeHoldersreports_Report[""]["F_sica"] = "";
	$fieldLabelsreports_Report[""]["Psicol_gica"] = "Psicológica";
	$fieldToolTipsreports_Report[""]["Psicol_gica"] = "";
	$placeHoldersreports_Report[""]["Psicol_gica"] = "";
	$fieldLabelsreports_Report[""]["Dom_stica"] = "Doméstica";
	$fieldToolTipsreports_Report[""]["Dom_stica"] = "";
	$placeHoldersreports_Report[""]["Dom_stica"] = "";
	$fieldLabelsreports_Report[""]["Moral"] = "Moral";
	$fieldToolTipsreports_Report[""]["Moral"] = "";
	$placeHoldersreports_Report[""]["Moral"] = "";
	$fieldLabelsreports_Report[""]["Institucional"] = "Institucional";
	$fieldToolTipsreports_Report[""]["Institucional"] = "";
	$placeHoldersreports_Report[""]["Institucional"] = "";
	$fieldLabelsreports_Report[""]["Vitimas"] = "Vitimas";
	$fieldToolTipsreports_Report[""]["Vitimas"] = "";
	$placeHoldersreports_Report[""]["Vitimas"] = "";
	if (count($fieldToolTipsreports_Report[""]))
		$tdatareports_Report[".isUseToolTips"] = true;
}


	$tdatareports_Report[".NCSearch"] = true;



$tdatareports_Report[".shortTableName"] = "reports_Report";
$tdatareports_Report[".nSecOptions"] = 0;
$tdatareports_Report[".recsPerRowPrint"] = 1;
$tdatareports_Report[".recsLimit"] = 5;
$tdatareports_Report[".mainTableOwnerID"] = "";
$tdatareports_Report[".moveNext"] = 1;
$tdatareports_Report[".entityType"] = 2;

$tdatareports_Report[".strOriginalTableName"] = "reports";

	



$tdatareports_Report[".showAddInPopup"] = false;

$tdatareports_Report[".showEditInPopup"] = false;

$tdatareports_Report[".showViewInPopup"] = false;

//page's base css files names
$popupPagesLayoutNames = array();
$tdatareports_Report[".popupPagesLayoutNames"] = $popupPagesLayoutNames;


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

$tdatareports_Report[".listAjax"] = false;

	$tdatareports_Report[".audit"] = false;

	$tdatareports_Report[".locking"] = false;


$tdatareports_Report[".add"] = true;
$tdatareports_Report[".afterAddAction"] = 1;
$tdatareports_Report[".closePopupAfterAdd"] = 1;
$tdatareports_Report[".afterAddActionDetTable"] = "";

$tdatareports_Report[".list"] = true;



$tdatareports_Report[".reorderRecordsByHeader"] = true;


$tdatareports_Report[".exportFormatting"] = 2;
$tdatareports_Report[".exportDelimiter"] = ",";
		


$tdatareports_Report[".exportTo"] = true;

$tdatareports_Report[".printFriendly"] = true;


$tdatareports_Report[".showSimpleSearchOptions"] = false;

// Allow Show/Hide Fields in GRID
$tdatareports_Report[".allowShowHideFields"] = false;
//

// Allow Fields Reordering in GRID
$tdatareports_Report[".allowFieldsReordering"] = false;
//

// search Saving settings
$tdatareports_Report[".searchSaving"] = false;
//

$tdatareports_Report[".showSearchPanel"] = true;
		$tdatareports_Report[".flexibleSearch"] = true;

$tdatareports_Report[".isUseAjaxSuggest"] = true;






$tdatareports_Report[".ajaxCodeSnippetAdded"] = false;

$tdatareports_Report[".buttonsAdded"] = false;

$tdatareports_Report[".addPageEvents"] = false;

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





$tdatareports_Report[".allSearchFields"] = array();
$tdatareports_Report[".filterFields"] = array();
$tdatareports_Report[".requiredSearchFields"] = array();

$tdatareports_Report[".allSearchFields"][] = "Bairro";
	$tdatareports_Report[".allSearchFields"][] = "Vitimas";
	$tdatareports_Report[".allSearchFields"][] = "Sexual";
	$tdatareports_Report[".allSearchFields"][] = "Física";
	$tdatareports_Report[".allSearchFields"][] = "Psicológica";
	$tdatareports_Report[".allSearchFields"][] = "Doméstica";
	$tdatareports_Report[".allSearchFields"][] = "Moral";
	$tdatareports_Report[".allSearchFields"][] = "Institucional";
	

$tdatareports_Report[".googleLikeFields"] = array();
$tdatareports_Report[".googleLikeFields"][] = "Bairro";
$tdatareports_Report[".googleLikeFields"][] = "Vitimas";
$tdatareports_Report[".googleLikeFields"][] = "Sexual";
$tdatareports_Report[".googleLikeFields"][] = "Física";
$tdatareports_Report[".googleLikeFields"][] = "Psicológica";
$tdatareports_Report[".googleLikeFields"][] = "Doméstica";
$tdatareports_Report[".googleLikeFields"][] = "Moral";
$tdatareports_Report[".googleLikeFields"][] = "Institucional";


$tdatareports_Report[".advSearchFields"] = array();
$tdatareports_Report[".advSearchFields"][] = "Bairro";
$tdatareports_Report[".advSearchFields"][] = "Vitimas";
$tdatareports_Report[".advSearchFields"][] = "Sexual";
$tdatareports_Report[".advSearchFields"][] = "Física";
$tdatareports_Report[".advSearchFields"][] = "Psicológica";
$tdatareports_Report[".advSearchFields"][] = "Doméstica";
$tdatareports_Report[".advSearchFields"][] = "Moral";
$tdatareports_Report[".advSearchFields"][] = "Institucional";

$tdatareports_Report[".tableType"] = "report";

$tdatareports_Report[".printerPageOrientation"] = 0;
$tdatareports_Report[".nPrinterPageScale"] = 100;

$tdatareports_Report[".nPrinterSplitRecords"] = 40;

$tdatareports_Report[".nPrinterPDFSplitRecords"] = 40;



$tdatareports_Report[".geocodingEnabled"] = false;

//report settings
$tdatareports_Report[".printReportLayout"] = 6;

$tdatareports_Report[".reportPrintPartitionType"] = 1;
$tdatareports_Report[".reportPrintGroupsPerPage"] = 40;
$tdatareports_Report[".reportPrintPDFGroupsPerPage"] = 40;
$tdatareports_Report[".lowGroup"] = 0;



$tdatareports_Report[".pageSize"] = 20;

$tdatareports_Report[".reportHorizontalSummary"] = true;





$tdatareports_Report[".repShowDet"] = true;

$tdatareports_Report[".reportLayout"] = 6;

//end of report settings




$tdatareports_Report[".listGridLayout"] = 3;





// view page pdf

// print page pdf



$tstrOrderBy = "ORDER BY Vitimas DESC";
if(strlen($tstrOrderBy) && strtolower(substr($tstrOrderBy,0,8))!="order by")
	$tstrOrderBy = "order by ".$tstrOrderBy;
$tdatareports_Report[".strOrderBy"] = $tstrOrderBy;

$tdatareports_Report[".orderindexes"] = array();
	$tdatareports_Report[".orderindexes"][] = array(2, (0 ? "ASC" : "DESC"), "COUNT(morada)");


$tdatareports_Report[".sqlHead"] = "  SELECT morada as Bairro,  	COUNT(morada) as Vitimas,  (SELECT Count(tipo_violacao) FROM reports WHERE morada=Bairro and tipo_violacao='Sexual') AS Sexual,  (SELECT Count(tipo_violacao) FROM reports WHERE morada=Bairro and tipo_violacao='Física') AS Física,  (SELECT Count(tipo_violacao) FROM reports WHERE morada=Bairro and tipo_violacao='Psicológica') AS Psicológica,  (SELECT Count(tipo_violacao) FROM reports WHERE morada=Bairro and tipo_violacao='Doméstica') AS Doméstica,  (SELECT Count(tipo_violacao) FROM reports WHERE morada=Bairro and tipo_violacao='Moral') AS Moral,  (SELECT Count(tipo_violacao) FROM reports WHERE morada=Bairro and tipo_violacao='Institucional') AS Institucional";
$tdatareports_Report[".sqlFrom"] = "FROM reports";
$tdatareports_Report[".sqlWhereExpr"] = "";
$tdatareports_Report[".sqlTail"] = "LIMIT 5";












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

$tdatareports_Report[".highlightSearchResults"] = true;

$tableKeysreports_Report = array();
$tdatareports_Report[".Keys"] = $tableKeysreports_Report;

$tdatareports_Report[".listFields"] = array();
$tdatareports_Report[".listFields"][] = "Bairro";
$tdatareports_Report[".listFields"][] = "Vitimas";
$tdatareports_Report[".listFields"][] = "Sexual";
$tdatareports_Report[".listFields"][] = "Física";
$tdatareports_Report[".listFields"][] = "Psicológica";
$tdatareports_Report[".listFields"][] = "Doméstica";
$tdatareports_Report[".listFields"][] = "Moral";
$tdatareports_Report[".listFields"][] = "Institucional";

$tdatareports_Report[".hideMobileList"] = array();


$tdatareports_Report[".viewFields"] = array();
$tdatareports_Report[".viewFields"][] = "Bairro";
$tdatareports_Report[".viewFields"][] = "Vitimas";
$tdatareports_Report[".viewFields"][] = "Sexual";
$tdatareports_Report[".viewFields"][] = "Física";
$tdatareports_Report[".viewFields"][] = "Psicológica";
$tdatareports_Report[".viewFields"][] = "Doméstica";
$tdatareports_Report[".viewFields"][] = "Moral";
$tdatareports_Report[".viewFields"][] = "Institucional";

$tdatareports_Report[".addFields"] = array();

$tdatareports_Report[".masterListFields"] = array();
$tdatareports_Report[".masterListFields"][] = "Bairro";
$tdatareports_Report[".masterListFields"][] = "Vitimas";
$tdatareports_Report[".masterListFields"][] = "Sexual";
$tdatareports_Report[".masterListFields"][] = "Física";
$tdatareports_Report[".masterListFields"][] = "Psicológica";
$tdatareports_Report[".masterListFields"][] = "Doméstica";
$tdatareports_Report[".masterListFields"][] = "Moral";
$tdatareports_Report[".masterListFields"][] = "Institucional";

$tdatareports_Report[".inlineAddFields"] = array();

$tdatareports_Report[".editFields"] = array();

$tdatareports_Report[".inlineEditFields"] = array();

$tdatareports_Report[".updateSelectedFields"] = array();


$tdatareports_Report[".exportFields"] = array();
$tdatareports_Report[".exportFields"][] = "Bairro";
$tdatareports_Report[".exportFields"][] = "Vitimas";
$tdatareports_Report[".exportFields"][] = "Sexual";
$tdatareports_Report[".exportFields"][] = "Física";
$tdatareports_Report[".exportFields"][] = "Psicológica";
$tdatareports_Report[".exportFields"][] = "Doméstica";
$tdatareports_Report[".exportFields"][] = "Moral";
$tdatareports_Report[".exportFields"][] = "Institucional";

$tdatareports_Report[".importFields"] = array();
$tdatareports_Report[".importFields"][] = "Bairro";
$tdatareports_Report[".importFields"][] = "Vitimas";
$tdatareports_Report[".importFields"][] = "Sexual";
$tdatareports_Report[".importFields"][] = "Física";
$tdatareports_Report[".importFields"][] = "Psicológica";
$tdatareports_Report[".importFields"][] = "Doméstica";
$tdatareports_Report[".importFields"][] = "Moral";
$tdatareports_Report[".importFields"][] = "Institucional";

$tdatareports_Report[".printFields"] = array();
$tdatareports_Report[".printFields"][] = "Bairro";
$tdatareports_Report[".printFields"][] = "Vitimas";
$tdatareports_Report[".printFields"][] = "Sexual";
$tdatareports_Report[".printFields"][] = "Física";
$tdatareports_Report[".printFields"][] = "Psicológica";
$tdatareports_Report[".printFields"][] = "Doméstica";
$tdatareports_Report[".printFields"][] = "Moral";
$tdatareports_Report[".printFields"][] = "Institucional";


//	Bairro
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 1;
	$fdata["strName"] = "Bairro";
	$fdata["GoodName"] = "Bairro";
	$fdata["ownerTable"] = "reports";
	$fdata["Label"] = GetFieldLabel("reports_Report","Bairro");
	$fdata["FieldType"] = 200;

		// report field settings
					// end of report field settings

	
	
			
		$fdata["bListPage"] = true;

	
	
	
	
	

		$fdata["bViewPage"] = true;

		$fdata["bAdvancedSearch"] = true;

		$fdata["bPrinterPage"] = true;

		$fdata["bExportPage"] = true;

		$fdata["strField"] = "morada";

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "morada";

	
	
				$fdata["FieldPermissions"] = true;

				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

		
	
	$fdata["ViewFormats"]["report"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Text field");

	
	
		
	


	
	
	
			$edata["acceptFileTypes"] = ".+$";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
		
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
	
	
	//	End validation

	
	
	
	
	
	$fdata["EditFormats"]["search"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings




	$tdatareports_Report["Bairro"] = $fdata;
//	Vitimas
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "Vitimas";
	$fdata["GoodName"] = "Vitimas";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("reports_Report","Vitimas");
	$fdata["FieldType"] = 3;

		// report field settings
					// end of report field settings

	
	
			
		$fdata["bListPage"] = true;

	
	
	
	
	

		$fdata["bViewPage"] = true;

		$fdata["bAdvancedSearch"] = true;

		$fdata["bPrinterPage"] = true;

		$fdata["bExportPage"] = true;

		$fdata["strField"] = "Vitimas";

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "COUNT(morada)";

	
	
				$fdata["FieldPermissions"] = true;

				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

		
	
	$fdata["ViewFormats"]["report"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Text field");

	
	
		
	


		$edata["IsRequired"] = true;

	
	
			$edata["acceptFileTypes"] = ".+$";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
		
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
				$edata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
		
	
	//	End validation

	
	
	
	
	
	$fdata["EditFormats"]["search"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings




	$tdatareports_Report["Vitimas"] = $fdata;
//	Sexual
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "Sexual";
	$fdata["GoodName"] = "Sexual";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("reports_Report","Sexual");
	$fdata["FieldType"] = 3;

		// report field settings
					// end of report field settings

	
	
			
		$fdata["bListPage"] = true;

	
	
	
	
	

		$fdata["bViewPage"] = true;

		$fdata["bAdvancedSearch"] = true;

		$fdata["bPrinterPage"] = true;

		$fdata["bExportPage"] = true;

		$fdata["strField"] = "Sexual";

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "(SELECT Count(tipo_violacao) FROM reports WHERE morada=Bairro and tipo_violacao='Sexual')";

	
	
				$fdata["FieldPermissions"] = true;

				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

		
	
	$fdata["ViewFormats"]["report"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Text field");

	
	
		
	


		$edata["IsRequired"] = true;

	
	
			$edata["acceptFileTypes"] = ".+$";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
		
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
				$edata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
		
	
	//	End validation

	
	
	
	
	
	$fdata["EditFormats"]["search"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings




	$tdatareports_Report["Sexual"] = $fdata;
//	Física
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "Física";
	$fdata["GoodName"] = "F_sica";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("reports_Report","F_sica");
	$fdata["FieldType"] = 3;

		// report field settings
					// end of report field settings

	
	
			
		$fdata["bListPage"] = true;

	
	
	
	
	

		$fdata["bViewPage"] = true;

		$fdata["bAdvancedSearch"] = true;

		$fdata["bPrinterPage"] = true;

		$fdata["bExportPage"] = true;

		$fdata["strField"] = "Física";

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "(SELECT Count(tipo_violacao) FROM reports WHERE morada=Bairro and tipo_violacao='Física')";

	
	
				$fdata["FieldPermissions"] = true;

				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

		
	
	$fdata["ViewFormats"]["report"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Text field");

	
	
		
	


		$edata["IsRequired"] = true;

	
	
			$edata["acceptFileTypes"] = ".+$";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
		
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
				$edata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
		
	
	//	End validation

	
	
	
	
	
	$fdata["EditFormats"]["search"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings




	$tdatareports_Report["Física"] = $fdata;
//	Psicológica
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "Psicológica";
	$fdata["GoodName"] = "Psicol_gica";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("reports_Report","Psicol_gica");
	$fdata["FieldType"] = 3;

		// report field settings
					// end of report field settings

	
	
			
		$fdata["bListPage"] = true;

	
	
	
	
	

		$fdata["bViewPage"] = true;

		$fdata["bAdvancedSearch"] = true;

		$fdata["bPrinterPage"] = true;

		$fdata["bExportPage"] = true;

		$fdata["strField"] = "Psicológica";

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "(SELECT Count(tipo_violacao) FROM reports WHERE morada=Bairro and tipo_violacao='Psicológica')";

	
	
				$fdata["FieldPermissions"] = true;

				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

		
	
	$fdata["ViewFormats"]["report"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Text field");

	
	
		
	


		$edata["IsRequired"] = true;

	
	
			$edata["acceptFileTypes"] = ".+$";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
		
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
				$edata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
		
	
	//	End validation

	
	
	
	
	
	$fdata["EditFormats"]["search"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings




	$tdatareports_Report["Psicológica"] = $fdata;
//	Doméstica
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "Doméstica";
	$fdata["GoodName"] = "Dom_stica";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("reports_Report","Dom_stica");
	$fdata["FieldType"] = 3;

		// report field settings
					// end of report field settings

	
	
			
		$fdata["bListPage"] = true;

	
	
	
	
	

		$fdata["bViewPage"] = true;

		$fdata["bAdvancedSearch"] = true;

		$fdata["bPrinterPage"] = true;

		$fdata["bExportPage"] = true;

		$fdata["strField"] = "Doméstica";

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "(SELECT Count(tipo_violacao) FROM reports WHERE morada=Bairro and tipo_violacao='Doméstica')";

	
	
				$fdata["FieldPermissions"] = true;

				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

		
	
	$fdata["ViewFormats"]["report"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Text field");

	
	
		
	


		$edata["IsRequired"] = true;

	
	
			$edata["acceptFileTypes"] = ".+$";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
		
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
				$edata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
		
	
	//	End validation

	
	
	
	
	
	$fdata["EditFormats"]["search"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings




	$tdatareports_Report["Doméstica"] = $fdata;
//	Moral
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "Moral";
	$fdata["GoodName"] = "Moral";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("reports_Report","Moral");
	$fdata["FieldType"] = 3;

		// report field settings
					// end of report field settings

	
	
			
		$fdata["bListPage"] = true;

	
	
	
	
	

		$fdata["bViewPage"] = true;

		$fdata["bAdvancedSearch"] = true;

		$fdata["bPrinterPage"] = true;

		$fdata["bExportPage"] = true;

		$fdata["strField"] = "Moral";

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "(SELECT Count(tipo_violacao) FROM reports WHERE morada=Bairro and tipo_violacao='Moral')";

	
	
				$fdata["FieldPermissions"] = true;

				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

		
	
	$fdata["ViewFormats"]["report"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Text field");

	
	
		
	


		$edata["IsRequired"] = true;

	
	
			$edata["acceptFileTypes"] = ".+$";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
		
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
				$edata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
		
	
	//	End validation

	
	
	
	
	
	$fdata["EditFormats"]["search"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings




	$tdatareports_Report["Moral"] = $fdata;
//	Institucional
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 8;
	$fdata["strName"] = "Institucional";
	$fdata["GoodName"] = "Institucional";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("reports_Report","Institucional");
	$fdata["FieldType"] = 3;

		// report field settings
					// end of report field settings

	
	
			
		$fdata["bListPage"] = true;

	
	
	
	
	

		$fdata["bViewPage"] = true;

		$fdata["bAdvancedSearch"] = true;

		$fdata["bPrinterPage"] = true;

		$fdata["bExportPage"] = true;

		$fdata["strField"] = "Institucional";

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "(SELECT Count(tipo_violacao) FROM reports WHERE morada=Bairro and tipo_violacao='Institucional')";

	
	
				$fdata["FieldPermissions"] = true;

				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

		
	
	$fdata["ViewFormats"]["report"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Text field");

	
	
		
	


		$edata["IsRequired"] = true;

	
	
			$edata["acceptFileTypes"] = ".+$";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
		
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
				$edata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
		
	
	//	End validation

	
	
	
	
	
	$fdata["EditFormats"]["search"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings




	$tdatareports_Report["Institucional"] = $fdata;


$tables_data["reports Report"]=&$tdatareports_Report;
$field_labels["reports_Report"] = &$fieldLabelsreports_Report;
$fieldToolTips["reports_Report"] = &$fieldToolTipsreports_Report;
$placeHolders["reports_Report"] = &$placeHoldersreports_Report;
$page_titles["reports_Report"] = &$pageTitlesreports_Report;

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

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


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

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










function createSqlQuery_reports_Report()
{
$proto0=array();
$proto0["m_strHead"] = "  SELECT";
$proto0["m_strFieldList"] = "morada as Bairro,  	COUNT(morada) as Vitimas,  (SELECT Count(tipo_violacao) FROM reports WHERE morada=Bairro and tipo_violacao='Sexual') AS Sexual,  (SELECT Count(tipo_violacao) FROM reports WHERE morada=Bairro and tipo_violacao='Física') AS Física,  (SELECT Count(tipo_violacao) FROM reports WHERE morada=Bairro and tipo_violacao='Psicológica') AS Psicológica,  (SELECT Count(tipo_violacao) FROM reports WHERE morada=Bairro and tipo_violacao='Doméstica') AS Doméstica,  (SELECT Count(tipo_violacao) FROM reports WHERE morada=Bairro and tipo_violacao='Moral') AS Moral,  (SELECT Count(tipo_violacao) FROM reports WHERE morada=Bairro and tipo_violacao='Institucional') AS Institucional";
$proto0["m_strFrom"] = "FROM reports";
$proto0["m_strWhere"] = "";
$proto0["m_strOrderBy"] = "ORDER BY Vitimas DESC";
	
		;
			$proto0["cipherer"] = null;
$proto2=array();
$proto2["m_sql"] = "";
$proto2["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

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

$proto0["m_having"] = $obj;
$proto0["m_fieldlist"] = array();
						$proto6=array();
			$obj = new SQLField(array(
	"m_strName" => "morada",
	"m_strTable" => "reports",
	"m_srcTableName" => "reports Report"
));

$proto6["m_sql"] = "morada";
$proto6["m_srcTableName"] = "reports Report";
$proto6["m_expr"]=$obj;
$proto6["m_alias"] = "Bairro";
$obj = new SQLFieldListItem($proto6);

$proto0["m_fieldlist"][]=$obj;
						$proto8=array();
			$proto9=array();
$proto9["m_functiontype"] = "SQLF_COUNT";
$proto9["m_arguments"] = array();
						$obj = new SQLField(array(
	"m_strName" => "morada",
	"m_strTable" => "reports",
	"m_srcTableName" => "reports Report"
));

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

$proto8["m_sql"] = "COUNT(morada)";
$proto8["m_srcTableName"] = "reports Report";
$proto8["m_expr"]=$obj;
$proto8["m_alias"] = "Vitimas";
$obj = new SQLFieldListItem($proto8);

$proto0["m_fieldlist"][]=$obj;
						$proto11=array();
			$proto12=array();
$proto12["m_strHead"] = "SELECT";
$proto12["m_strFieldList"] = "Count(tipo_violacao)";
$proto12["m_strFrom"] = "FROM reports";
$proto12["m_strWhere"] = "morada=Bairro and tipo_violacao='Sexual'";
$proto12["m_strOrderBy"] = "";
	
		;
			$proto12["cipherer"] = null;
$proto14=array();
$proto14["m_sql"] = "morada=Bairro and tipo_violacao='Sexual'";
$proto14["m_uniontype"] = "SQLL_AND";
	$obj = new SQLNonParsed(array(
	"m_sql" => "morada=Bairro and tipo_violacao='Sexual'"
));

$proto14["m_column"]=$obj;
$proto14["m_contained"] = array();
						$proto16=array();
$proto16["m_sql"] = "morada=Bairro";
$proto16["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "morada",
	"m_strTable" => "reports",
	"m_srcTableName" => "reports Report"
));

$proto16["m_column"]=$obj;
$proto16["m_contained"] = array();
$proto16["m_strCase"] = "=Bairro";
$proto16["m_havingmode"] = false;
$proto16["m_inBrackets"] = false;
$proto16["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto16);

			$proto14["m_contained"][]=$obj;
						$proto18=array();
$proto18["m_sql"] = "tipo_violacao='Sexual'";
$proto18["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "tipo_violacao",
	"m_strTable" => "reports",
	"m_srcTableName" => "reports Report"
));

$proto18["m_column"]=$obj;
$proto18["m_contained"] = array();
$proto18["m_strCase"] = "='Sexual'";
$proto18["m_havingmode"] = false;
$proto18["m_inBrackets"] = false;
$proto18["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto18);

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

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

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

$proto12["m_having"] = $obj;
$proto12["m_fieldlist"] = array();
						$proto22=array();
			$proto23=array();
$proto23["m_functiontype"] = "SQLF_COUNT";
$proto23["m_arguments"] = array();
						$obj = new SQLField(array(
	"m_strName" => "tipo_violacao",
	"m_strTable" => "reports",
	"m_srcTableName" => "reports Report"
));

$proto23["m_arguments"][]=$obj;
$proto23["m_strFunctionName"] = "Count";
$obj = new SQLFunctionCall($proto23);

$proto22["m_sql"] = "Count(tipo_violacao)";
$proto22["m_srcTableName"] = "reports Report";
$proto22["m_expr"]=$obj;
$proto22["m_alias"] = "";
$obj = new SQLFieldListItem($proto22);

$proto12["m_fieldlist"][]=$obj;
$proto12["m_fromlist"] = array();
												$proto25=array();
$proto25["m_link"] = "SQLL_MAIN";
			$proto26=array();
$proto26["m_strName"] = "reports";
$proto26["m_srcTableName"] = "reports Report";
$proto26["m_columns"] = array();
$proto26["m_columns"][] = "id";
$proto26["m_columns"][] = "contacto";
$proto26["m_columns"][] = "genero";
$proto26["m_columns"][] = "idade";
$proto26["m_columns"][] = "morada";
$proto26["m_columns"][] = "quarteirao";
$proto26["m_columns"][] = "tipo_violacao";
$proto26["m_columns"][] = "agressor";
$proto26["m_columns"][] = "descricao";
$proto26["m_columns"][] = "data_agressao";
$proto26["m_columns"][] = "data_registo";
$proto26["m_columns"][] = "Estado";
$obj = new SQLTable($proto26);

$proto25["m_table"] = $obj;
$proto25["m_sql"] = "reports";
$proto25["m_alias"] = "";
$proto25["m_srcTableName"] = "reports Report";
$proto27=array();
$proto27["m_sql"] = "";
$proto27["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto12["m_fromlist"][]=$obj;
$proto12["m_groupby"] = array();
$proto12["m_orderby"] = array();
$proto12["m_srcTableName"]="reports Report";		
$obj = new SQLQuery($proto12);

$proto11["m_sql"] = "(SELECT Count(tipo_violacao) FROM reports WHERE morada=Bairro and tipo_violacao='Sexual')";
$proto11["m_srcTableName"] = "reports Report";
$proto11["m_expr"]=$obj;
$proto11["m_alias"] = "Sexual";
$obj = new SQLFieldListItem($proto11);

$proto0["m_fieldlist"][]=$obj;
						$proto29=array();
			$proto30=array();
$proto30["m_strHead"] = "SELECT";
$proto30["m_strFieldList"] = "Count(tipo_violacao)";
$proto30["m_strFrom"] = "FROM reports";
$proto30["m_strWhere"] = "morada=Bairro and tipo_violacao='Física'";
$proto30["m_strOrderBy"] = "";
	
		;
			$proto30["cipherer"] = null;
$proto32=array();
$proto32["m_sql"] = "morada=Bairro and tipo_violacao='Física'";
$proto32["m_uniontype"] = "SQLL_AND";
	$obj = new SQLNonParsed(array(
	"m_sql" => "morada=Bairro and tipo_violacao='Física'"
));

$proto32["m_column"]=$obj;
$proto32["m_contained"] = array();
						$proto34=array();
$proto34["m_sql"] = "morada=Bairro";
$proto34["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "morada",
	"m_strTable" => "reports",
	"m_srcTableName" => "reports Report"
));

$proto34["m_column"]=$obj;
$proto34["m_contained"] = array();
$proto34["m_strCase"] = "=Bairro";
$proto34["m_havingmode"] = false;
$proto34["m_inBrackets"] = false;
$proto34["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto34);

			$proto32["m_contained"][]=$obj;
						$proto36=array();
$proto36["m_sql"] = "tipo_violacao='Física'";
$proto36["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "tipo_violacao",
	"m_strTable" => "reports",
	"m_srcTableName" => "reports Report"
));

$proto36["m_column"]=$obj;
$proto36["m_contained"] = array();
$proto36["m_strCase"] = "='Física'";
$proto36["m_havingmode"] = false;
$proto36["m_inBrackets"] = false;
$proto36["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto36);

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

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

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

$proto30["m_having"] = $obj;
$proto30["m_fieldlist"] = array();
						$proto40=array();
			$proto41=array();
$proto41["m_functiontype"] = "SQLF_COUNT";
$proto41["m_arguments"] = array();
						$obj = new SQLField(array(
	"m_strName" => "tipo_violacao",
	"m_strTable" => "reports",
	"m_srcTableName" => "reports Report"
));

$proto41["m_arguments"][]=$obj;
$proto41["m_strFunctionName"] = "Count";
$obj = new SQLFunctionCall($proto41);

$proto40["m_sql"] = "Count(tipo_violacao)";
$proto40["m_srcTableName"] = "reports Report";
$proto40["m_expr"]=$obj;
$proto40["m_alias"] = "";
$obj = new SQLFieldListItem($proto40);

$proto30["m_fieldlist"][]=$obj;
$proto30["m_fromlist"] = array();
												$proto43=array();
$proto43["m_link"] = "SQLL_MAIN";
			$proto44=array();
$proto44["m_strName"] = "reports";
$proto44["m_srcTableName"] = "reports Report";
$proto44["m_columns"] = array();
$proto44["m_columns"][] = "id";
$proto44["m_columns"][] = "contacto";
$proto44["m_columns"][] = "genero";
$proto44["m_columns"][] = "idade";
$proto44["m_columns"][] = "morada";
$proto44["m_columns"][] = "quarteirao";
$proto44["m_columns"][] = "tipo_violacao";
$proto44["m_columns"][] = "agressor";
$proto44["m_columns"][] = "descricao";
$proto44["m_columns"][] = "data_agressao";
$proto44["m_columns"][] = "data_registo";
$proto44["m_columns"][] = "Estado";
$obj = new SQLTable($proto44);

$proto43["m_table"] = $obj;
$proto43["m_sql"] = "reports";
$proto43["m_alias"] = "";
$proto43["m_srcTableName"] = "reports Report";
$proto45=array();
$proto45["m_sql"] = "";
$proto45["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto30["m_fromlist"][]=$obj;
$proto30["m_groupby"] = array();
$proto30["m_orderby"] = array();
$proto30["m_srcTableName"]="reports Report";		
$obj = new SQLQuery($proto30);

$proto29["m_sql"] = "(SELECT Count(tipo_violacao) FROM reports WHERE morada=Bairro and tipo_violacao='Física')";
$proto29["m_srcTableName"] = "reports Report";
$proto29["m_expr"]=$obj;
$proto29["m_alias"] = "Física";
$obj = new SQLFieldListItem($proto29);

$proto0["m_fieldlist"][]=$obj;
						$proto47=array();
			$proto48=array();
$proto48["m_strHead"] = "SELECT";
$proto48["m_strFieldList"] = "Count(tipo_violacao)";
$proto48["m_strFrom"] = "FROM reports";
$proto48["m_strWhere"] = "morada=Bairro and tipo_violacao='Psicológica'";
$proto48["m_strOrderBy"] = "";
	
		;
			$proto48["cipherer"] = null;
$proto50=array();
$proto50["m_sql"] = "morada=Bairro and tipo_violacao='Psicológica'";
$proto50["m_uniontype"] = "SQLL_AND";
	$obj = new SQLNonParsed(array(
	"m_sql" => "morada=Bairro and tipo_violacao='Psicológica'"
));

$proto50["m_column"]=$obj;
$proto50["m_contained"] = array();
						$proto52=array();
$proto52["m_sql"] = "morada=Bairro";
$proto52["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "morada",
	"m_strTable" => "reports",
	"m_srcTableName" => "reports Report"
));

$proto52["m_column"]=$obj;
$proto52["m_contained"] = array();
$proto52["m_strCase"] = "=Bairro";
$proto52["m_havingmode"] = false;
$proto52["m_inBrackets"] = false;
$proto52["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto52);

			$proto50["m_contained"][]=$obj;
						$proto54=array();
$proto54["m_sql"] = "tipo_violacao='Psicológica'";
$proto54["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "tipo_violacao",
	"m_strTable" => "reports",
	"m_srcTableName" => "reports Report"
));

$proto54["m_column"]=$obj;
$proto54["m_contained"] = array();
$proto54["m_strCase"] = "='Psicológica'";
$proto54["m_havingmode"] = false;
$proto54["m_inBrackets"] = false;
$proto54["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto54);

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

$proto48["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"] = false;
$proto56["m_inBrackets"] = false;
$proto56["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto56);

$proto48["m_having"] = $obj;
$proto48["m_fieldlist"] = array();
						$proto58=array();
			$proto59=array();
$proto59["m_functiontype"] = "SQLF_COUNT";
$proto59["m_arguments"] = array();
						$obj = new SQLField(array(
	"m_strName" => "tipo_violacao",
	"m_strTable" => "reports",
	"m_srcTableName" => "reports Report"
));

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

$proto58["m_sql"] = "Count(tipo_violacao)";
$proto58["m_srcTableName"] = "reports Report";
$proto58["m_expr"]=$obj;
$proto58["m_alias"] = "";
$obj = new SQLFieldListItem($proto58);

$proto48["m_fieldlist"][]=$obj;
$proto48["m_fromlist"] = array();
												$proto61=array();
$proto61["m_link"] = "SQLL_MAIN";
			$proto62=array();
$proto62["m_strName"] = "reports";
$proto62["m_srcTableName"] = "reports Report";
$proto62["m_columns"] = array();
$proto62["m_columns"][] = "id";
$proto62["m_columns"][] = "contacto";
$proto62["m_columns"][] = "genero";
$proto62["m_columns"][] = "idade";
$proto62["m_columns"][] = "morada";
$proto62["m_columns"][] = "quarteirao";
$proto62["m_columns"][] = "tipo_violacao";
$proto62["m_columns"][] = "agressor";
$proto62["m_columns"][] = "descricao";
$proto62["m_columns"][] = "data_agressao";
$proto62["m_columns"][] = "data_registo";
$proto62["m_columns"][] = "Estado";
$obj = new SQLTable($proto62);

$proto61["m_table"] = $obj;
$proto61["m_sql"] = "reports";
$proto61["m_alias"] = "";
$proto61["m_srcTableName"] = "reports Report";
$proto63=array();
$proto63["m_sql"] = "";
$proto63["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto48["m_fromlist"][]=$obj;
$proto48["m_groupby"] = array();
$proto48["m_orderby"] = array();
$proto48["m_srcTableName"]="reports Report";		
$obj = new SQLQuery($proto48);

$proto47["m_sql"] = "(SELECT Count(tipo_violacao) FROM reports WHERE morada=Bairro and tipo_violacao='Psicológica')";
$proto47["m_srcTableName"] = "reports Report";
$proto47["m_expr"]=$obj;
$proto47["m_alias"] = "Psicológica";
$obj = new SQLFieldListItem($proto47);

$proto0["m_fieldlist"][]=$obj;
						$proto65=array();
			$proto66=array();
$proto66["m_strHead"] = "SELECT";
$proto66["m_strFieldList"] = "Count(tipo_violacao)";
$proto66["m_strFrom"] = "FROM reports";
$proto66["m_strWhere"] = "morada=Bairro and tipo_violacao='Doméstica'";
$proto66["m_strOrderBy"] = "";
	
		;
			$proto66["cipherer"] = null;
$proto68=array();
$proto68["m_sql"] = "morada=Bairro and tipo_violacao='Doméstica'";
$proto68["m_uniontype"] = "SQLL_AND";
	$obj = new SQLNonParsed(array(
	"m_sql" => "morada=Bairro and tipo_violacao='Doméstica'"
));

$proto68["m_column"]=$obj;
$proto68["m_contained"] = array();
						$proto70=array();
$proto70["m_sql"] = "morada=Bairro";
$proto70["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "morada",
	"m_strTable" => "reports",
	"m_srcTableName" => "reports Report"
));

$proto70["m_column"]=$obj;
$proto70["m_contained"] = array();
$proto70["m_strCase"] = "=Bairro";
$proto70["m_havingmode"] = false;
$proto70["m_inBrackets"] = false;
$proto70["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto70);

			$proto68["m_contained"][]=$obj;
						$proto72=array();
$proto72["m_sql"] = "tipo_violacao='Doméstica'";
$proto72["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "tipo_violacao",
	"m_strTable" => "reports",
	"m_srcTableName" => "reports Report"
));

$proto72["m_column"]=$obj;
$proto72["m_contained"] = array();
$proto72["m_strCase"] = "='Doméstica'";
$proto72["m_havingmode"] = false;
$proto72["m_inBrackets"] = false;
$proto72["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto72);

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

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

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

$proto66["m_having"] = $obj;
$proto66["m_fieldlist"] = array();
						$proto76=array();
			$proto77=array();
$proto77["m_functiontype"] = "SQLF_COUNT";
$proto77["m_arguments"] = array();
						$obj = new SQLField(array(
	"m_strName" => "tipo_violacao",
	"m_strTable" => "reports",
	"m_srcTableName" => "reports Report"
));

$proto77["m_arguments"][]=$obj;
$proto77["m_strFunctionName"] = "Count";
$obj = new SQLFunctionCall($proto77);

$proto76["m_sql"] = "Count(tipo_violacao)";
$proto76["m_srcTableName"] = "reports Report";
$proto76["m_expr"]=$obj;
$proto76["m_alias"] = "";
$obj = new SQLFieldListItem($proto76);

$proto66["m_fieldlist"][]=$obj;
$proto66["m_fromlist"] = array();
												$proto79=array();
$proto79["m_link"] = "SQLL_MAIN";
			$proto80=array();
$proto80["m_strName"] = "reports";
$proto80["m_srcTableName"] = "reports Report";
$proto80["m_columns"] = array();
$proto80["m_columns"][] = "id";
$proto80["m_columns"][] = "contacto";
$proto80["m_columns"][] = "genero";
$proto80["m_columns"][] = "idade";
$proto80["m_columns"][] = "morada";
$proto80["m_columns"][] = "quarteirao";
$proto80["m_columns"][] = "tipo_violacao";
$proto80["m_columns"][] = "agressor";
$proto80["m_columns"][] = "descricao";
$proto80["m_columns"][] = "data_agressao";
$proto80["m_columns"][] = "data_registo";
$proto80["m_columns"][] = "Estado";
$obj = new SQLTable($proto80);

$proto79["m_table"] = $obj;
$proto79["m_sql"] = "reports";
$proto79["m_alias"] = "";
$proto79["m_srcTableName"] = "reports Report";
$proto81=array();
$proto81["m_sql"] = "";
$proto81["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto66["m_fromlist"][]=$obj;
$proto66["m_groupby"] = array();
$proto66["m_orderby"] = array();
$proto66["m_srcTableName"]="reports Report";		
$obj = new SQLQuery($proto66);

$proto65["m_sql"] = "(SELECT Count(tipo_violacao) FROM reports WHERE morada=Bairro and tipo_violacao='Doméstica')";
$proto65["m_srcTableName"] = "reports Report";
$proto65["m_expr"]=$obj;
$proto65["m_alias"] = "Doméstica";
$obj = new SQLFieldListItem($proto65);

$proto0["m_fieldlist"][]=$obj;
						$proto83=array();
			$proto84=array();
$proto84["m_strHead"] = "SELECT";
$proto84["m_strFieldList"] = "Count(tipo_violacao)";
$proto84["m_strFrom"] = "FROM reports";
$proto84["m_strWhere"] = "morada=Bairro and tipo_violacao='Moral'";
$proto84["m_strOrderBy"] = "";
	
		;
			$proto84["cipherer"] = null;
$proto86=array();
$proto86["m_sql"] = "morada=Bairro and tipo_violacao='Moral'";
$proto86["m_uniontype"] = "SQLL_AND";
	$obj = new SQLNonParsed(array(
	"m_sql" => "morada=Bairro and tipo_violacao='Moral'"
));

$proto86["m_column"]=$obj;
$proto86["m_contained"] = array();
						$proto88=array();
$proto88["m_sql"] = "morada=Bairro";
$proto88["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "morada",
	"m_strTable" => "reports",
	"m_srcTableName" => "reports Report"
));

$proto88["m_column"]=$obj;
$proto88["m_contained"] = array();
$proto88["m_strCase"] = "=Bairro";
$proto88["m_havingmode"] = false;
$proto88["m_inBrackets"] = false;
$proto88["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto88);

			$proto86["m_contained"][]=$obj;
						$proto90=array();
$proto90["m_sql"] = "tipo_violacao='Moral'";
$proto90["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "tipo_violacao",
	"m_strTable" => "reports",
	"m_srcTableName" => "reports Report"
));

$proto90["m_column"]=$obj;
$proto90["m_contained"] = array();
$proto90["m_strCase"] = "='Moral'";
$proto90["m_havingmode"] = false;
$proto90["m_inBrackets"] = false;
$proto90["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto90);

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

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

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

$proto84["m_having"] = $obj;
$proto84["m_fieldlist"] = array();
						$proto94=array();
			$proto95=array();
$proto95["m_functiontype"] = "SQLF_COUNT";
$proto95["m_arguments"] = array();
						$obj = new SQLField(array(
	"m_strName" => "tipo_violacao",
	"m_strTable" => "reports",
	"m_srcTableName" => "reports Report"
));

$proto95["m_arguments"][]=$obj;
$proto95["m_strFunctionName"] = "Count";
$obj = new SQLFunctionCall($proto95);

$proto94["m_sql"] = "Count(tipo_violacao)";
$proto94["m_srcTableName"] = "reports Report";
$proto94["m_expr"]=$obj;
$proto94["m_alias"] = "";
$obj = new SQLFieldListItem($proto94);

$proto84["m_fieldlist"][]=$obj;
$proto84["m_fromlist"] = array();
												$proto97=array();
$proto97["m_link"] = "SQLL_MAIN";
			$proto98=array();
$proto98["m_strName"] = "reports";
$proto98["m_srcTableName"] = "reports Report";
$proto98["m_columns"] = array();
$proto98["m_columns"][] = "id";
$proto98["m_columns"][] = "contacto";
$proto98["m_columns"][] = "genero";
$proto98["m_columns"][] = "idade";
$proto98["m_columns"][] = "morada";
$proto98["m_columns"][] = "quarteirao";
$proto98["m_columns"][] = "tipo_violacao";
$proto98["m_columns"][] = "agressor";
$proto98["m_columns"][] = "descricao";
$proto98["m_columns"][] = "data_agressao";
$proto98["m_columns"][] = "data_registo";
$proto98["m_columns"][] = "Estado";
$obj = new SQLTable($proto98);

$proto97["m_table"] = $obj;
$proto97["m_sql"] = "reports";
$proto97["m_alias"] = "";
$proto97["m_srcTableName"] = "reports Report";
$proto99=array();
$proto99["m_sql"] = "";
$proto99["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto84["m_fromlist"][]=$obj;
$proto84["m_groupby"] = array();
$proto84["m_orderby"] = array();
$proto84["m_srcTableName"]="reports Report";		
$obj = new SQLQuery($proto84);

$proto83["m_sql"] = "(SELECT Count(tipo_violacao) FROM reports WHERE morada=Bairro and tipo_violacao='Moral')";
$proto83["m_srcTableName"] = "reports Report";
$proto83["m_expr"]=$obj;
$proto83["m_alias"] = "Moral";
$obj = new SQLFieldListItem($proto83);

$proto0["m_fieldlist"][]=$obj;
						$proto101=array();
			$proto102=array();
$proto102["m_strHead"] = "SELECT";
$proto102["m_strFieldList"] = "Count(tipo_violacao)";
$proto102["m_strFrom"] = "FROM reports";
$proto102["m_strWhere"] = "morada=Bairro and tipo_violacao='Institucional'";
$proto102["m_strOrderBy"] = "";
	
		;
			$proto102["cipherer"] = null;
$proto104=array();
$proto104["m_sql"] = "morada=Bairro and tipo_violacao='Institucional'";
$proto104["m_uniontype"] = "SQLL_AND";
	$obj = new SQLNonParsed(array(
	"m_sql" => "morada=Bairro and tipo_violacao='Institucional'"
));

$proto104["m_column"]=$obj;
$proto104["m_contained"] = array();
						$proto106=array();
$proto106["m_sql"] = "morada=Bairro";
$proto106["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "morada",
	"m_strTable" => "reports",
	"m_srcTableName" => "reports Report"
));

$proto106["m_column"]=$obj;
$proto106["m_contained"] = array();
$proto106["m_strCase"] = "=Bairro";
$proto106["m_havingmode"] = false;
$proto106["m_inBrackets"] = false;
$proto106["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto106);

			$proto104["m_contained"][]=$obj;
						$proto108=array();
$proto108["m_sql"] = "tipo_violacao='Institucional'";
$proto108["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "tipo_violacao",
	"m_strTable" => "reports",
	"m_srcTableName" => "reports Report"
));

$proto108["m_column"]=$obj;
$proto108["m_contained"] = array();
$proto108["m_strCase"] = "='Institucional'";
$proto108["m_havingmode"] = false;
$proto108["m_inBrackets"] = false;
$proto108["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto108);

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

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

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

$proto102["m_having"] = $obj;
$proto102["m_fieldlist"] = array();
						$proto112=array();
			$proto113=array();
$proto113["m_functiontype"] = "SQLF_COUNT";
$proto113["m_arguments"] = array();
						$obj = new SQLField(array(
	"m_strName" => "tipo_violacao",
	"m_strTable" => "reports",
	"m_srcTableName" => "reports Report"
));

$proto113["m_arguments"][]=$obj;
$proto113["m_strFunctionName"] = "Count";
$obj = new SQLFunctionCall($proto113);

$proto112["m_sql"] = "Count(tipo_violacao)";
$proto112["m_srcTableName"] = "reports Report";
$proto112["m_expr"]=$obj;
$proto112["m_alias"] = "";
$obj = new SQLFieldListItem($proto112);

$proto102["m_fieldlist"][]=$obj;
$proto102["m_fromlist"] = array();
												$proto115=array();
$proto115["m_link"] = "SQLL_MAIN";
			$proto116=array();
$proto116["m_strName"] = "reports";
$proto116["m_srcTableName"] = "reports Report";
$proto116["m_columns"] = array();
$proto116["m_columns"][] = "id";
$proto116["m_columns"][] = "contacto";
$proto116["m_columns"][] = "genero";
$proto116["m_columns"][] = "idade";
$proto116["m_columns"][] = "morada";
$proto116["m_columns"][] = "quarteirao";
$proto116["m_columns"][] = "tipo_violacao";
$proto116["m_columns"][] = "agressor";
$proto116["m_columns"][] = "descricao";
$proto116["m_columns"][] = "data_agressao";
$proto116["m_columns"][] = "data_registo";
$proto116["m_columns"][] = "Estado";
$obj = new SQLTable($proto116);

$proto115["m_table"] = $obj;
$proto115["m_sql"] = "reports";
$proto115["m_alias"] = "";
$proto115["m_srcTableName"] = "reports Report";
$proto117=array();
$proto117["m_sql"] = "";
$proto117["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto102["m_fromlist"][]=$obj;
$proto102["m_groupby"] = array();
$proto102["m_orderby"] = array();
$proto102["m_srcTableName"]="reports Report";		
$obj = new SQLQuery($proto102);

$proto101["m_sql"] = "(SELECT Count(tipo_violacao) FROM reports WHERE morada=Bairro and tipo_violacao='Institucional')";
$proto101["m_srcTableName"] = "reports Report";
$proto101["m_expr"]=$obj;
$proto101["m_alias"] = "Institucional";
$obj = new SQLFieldListItem($proto101);

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto119=array();
$proto119["m_link"] = "SQLL_MAIN";
			$proto120=array();
$proto120["m_strName"] = "reports";
$proto120["m_srcTableName"] = "reports Report";
$proto120["m_columns"] = array();
$proto120["m_columns"][] = "id";
$proto120["m_columns"][] = "contacto";
$proto120["m_columns"][] = "genero";
$proto120["m_columns"][] = "idade";
$proto120["m_columns"][] = "morada";
$proto120["m_columns"][] = "quarteirao";
$proto120["m_columns"][] = "tipo_violacao";
$proto120["m_columns"][] = "agressor";
$proto120["m_columns"][] = "descricao";
$proto120["m_columns"][] = "data_agressao";
$proto120["m_columns"][] = "data_registo";
$proto120["m_columns"][] = "Estado";
$obj = new SQLTable($proto120);

$proto119["m_table"] = $obj;
$proto119["m_sql"] = "reports";
$proto119["m_alias"] = "";
$proto119["m_srcTableName"] = "reports Report";
$proto121=array();
$proto121["m_sql"] = "";
$proto121["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto0["m_fromlist"][]=$obj;
$proto0["m_groupby"] = array();
												$proto123=array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "Bairro"
));

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

$proto0["m_groupby"][]=$obj;
$proto0["m_orderby"] = array();
												$proto125=array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "Vitimas"
));

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

$proto0["m_orderby"][]=$obj;					
$proto0["m_srcTableName"]="reports Report";		
$obj = new SQLQuery($proto0);

	return $obj;
}
$queryData_reports_Report = createSqlQuery_reports_Report();


	
		;

								

$tdatareports_Report[".sqlquery"] = $queryData_reports_Report;

$tableEvents["reports Report"] = new eventsBase;
$tdatareports_Report[".hasEvents"] = false;

?>