public function __construct($id, array $options = null) { require_once('modules/asol_Reports/include_basic/manageReportsFunctions.php'); parent::__construct($id,$options); $sDatabase = (isset($_REQUEST['sDatabase'])) ? $_REQUEST['sDatabase'] : "-1"; $sModule = (isset($_REQUEST['sModule'])) ? $_REQUEST['sModule'] : ""; $sScope = (isset($_REQUEST['sScope'])) ? $_REQUEST['sScope'] : ""; $sName = (isset($_REQUEST['sName'])) ? $_REQUEST['sName'] : ""; // Make a list of charts from the chartdef files require "modules/Charts/chartdefs.php"; if (file_exists("custom/Charts/chartDefs.ext.php")) require("custom/Charts/chartDefs.ext.php"); $this->chartDefs = $chartDefs; $this->_searchFields['which_chart']['options'] = asol_ReportsManagementFunctions::getFilteredReportList($sDatabase, $sModule, $sScope, $sName); }
<?php if (!defined('sugarEntry')) { define('sugarEntry', true); } require_once 'modules/asol_Reports/include_basic/manageReportsFunctions.php'; $reportList = asol_ReportsManagementFunctions::getFilteredReportList(); $viewdefs['base']['view']['reportchartdashlet'] = array('dashlets' => array(array('label' => 'LBL_DASHLET_REPORTCHART', 'description' => 'LBL_DASHLET_REPORTCHART_DESC', 'config' => array('reportId' => ''), 'preview' => array('reportId' => ''))), 'config' => array('fields' => array(array('name' => 'reportId', 'label' => 'LBL_DASHLET_REPORTCHART_REPORTID', 'type' => 'enum', 'searchBarThreshold' => -1, 'options' => $reportList))));