本文整理汇总了PHP中Report::get_total_header_row方法的典型用法代码示例。如果您正苦于以下问题:PHP Report::get_total_header_row方法的具体用法?PHP Report::get_total_header_row怎么用?PHP Report::get_total_header_row使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Report
的用法示例。
在下文中一共展示了Report::get_total_header_row方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
/**
* Displays the dashlet
*
* @return string html to display dashlet
*/
function display()
{
require_once "modules/Reports/Report.php";
// ini_set('display_errors', 'false');
$chartReport = new SavedReport();
$chartExists = $chartReport->retrieve($this->report_id, false);
if (!is_null($chartExists)) {
$this->title = $chartReport->name;
$reporter = new Report($chartReport->content);
$reporter->is_saved_report = true;
$reporter->saved_report_id = $chartReport->id;
$reporter->get_total_header_row();
$reporter->run_chart_queries();
require_once "modules/Reports/templates/templates_chart.php";
ob_start();
template_chart($reporter, true, true, $this->id);
$str = ob_get_contents();
ob_end_clean();
$xmlFile = get_cache_file_name($reporter);
$html = parent::display() . "<div align='center'>" . $str . "</div>" . "<br />";
// return parent::display for title and such
$ss = new Sugar_Smarty();
$ss->assign('chartName', $this->id);
$ss->assign('chartXMLFile', $xmlFile);
$script = $ss->fetch('modules/Home/Dashlets/ChartsDashlet/ChartsDashletScript.tpl');
$json = getJSONobj();
return parent::display() . "<div align='center'>" . $str . "</div>" . "<br />";
// return parent::display for title and such
}
}
示例2: setReporter
/**
* Set the Reporter (Report Object) to use
*
* @param Report $reporter
*/
public function setReporter(Report $reporter)
{
$this->reporter = $reporter;
// set the default stuff we need on the reporter
// and run the queries
$this->reporter->is_saved_report = true;
// only run if the chart_header_row variable is empty
if (empty($this->reporter->chart_header_row)) {
$this->reporter->get_total_header_row();
$this->reporter->run_chart_queries();
}
// set the chart type
$this->chartType = $this->reporter->chart_type;
$this->parseReportHeaders();
$this->parseChartTitle();
$this->parseChartRows();
}
示例3: display
/**
* Displays the dashlet
*
* @return string html to display dashlet
*/
function display()
{
require_once "modules/Reports/Report.php";
$chartReport = BeanFactory::getBean('Reports', $this->report_id, array('encode' => false, 'strict_retrieve' => true));
if (!empty($chartReport)) {
$title = getReportNameTranslation($chartReport->name);
$this->title = $title;
$reporter = new Report($chartReport->content);
$reporter->is_saved_report = true;
$reporter->saved_report_id = $chartReport->id;
$reporter->get_total_header_row();
$reporter->run_chart_queries();
ob_start();
require_once "include/SugarCharts/ChartDisplay.php";
$chartDisplay = new ChartDisplay();
$chartDisplay->setReporter($reporter);
echo $chartDisplay->legacyDisplay($this->id, true);
$str = ob_get_contents();
ob_end_clean();
$xmlFile = $chartDisplay->get_cache_file_name($reporter);
$html = parent::display() . "<div align='center'>" . $str . "</div>" . "<br />";
// return parent::display for title and such
$ss = new Sugar_Smarty();
$ss->assign('chartName', $this->id);
$ss->assign('chartXMLFile', $xmlFile);
$script = $ss->fetch('modules/Home/Dashlets/ChartsDashlet/ChartsDashletScript.tpl');
$json = getJSONobj();
return parent::display() . "<div align='center'>" . $str . "</div>" . "<br />";
// return parent::display for title and such
}
}