public function display() {
    	
    	global $current_user, $db;
    	
    	require_once('modules/asol_Reports/include_basic/generateReportsFunctions.php');
			
    	$displayReportDashlet = true;
		$reportId = (isset($this->which_chart[0])) ? $this->which_chart[0] : null;
		$dashletId = $this->id;
		
		//**************************//
		//***Is Domains Installed***//
		//**************************//
		if (asol_ReportsUtils::isDomainsInstalled()) {
			
			$reportDomainQuery = $db->query("SELECT asol_reports.asol_domain_id as domain_id, asol_domains.name as domain_name FROM asol_reports LEFT JOIN asol_domains ON asol_reports.asol_domain_id=asol_domains.id WHERE asol_reports.id='".$reportId."'");
			$reportDomainRow = $db->fetchByAssoc($reportDomainQuery);
			$displayReportDashlet = ((empty($reportId)) || (asol_ReportsGenerationFunctions::manageReportDomain($reportId, $current_user->asol_default_domain, $reportDomainRow['domain_id'])));
				
		}
		//**************************//
		//***Is Domains Installed***//
		//**************************//
		
		if ($displayReportDashlet) {
			
			if (!empty($reportId)) {

				return asol_ReportsGenerationFunctions::generateDashletReport($reportId, $dashletId, $this->processAutoRefresh());
				
			} else {
				
				return '<div align="center"></div>'.$this->processAutoRefresh();
				
			}
			
		} else {
			
			return '<script>
					$(document).ready(function() {
						$("li[id=\'dashlet_'.$dashletId.'\']").hide();
					});
				</script>';
			
		}
				
	}