/** * Run the report SQL and retrieve rows for rendering or exporting. * * This method also sends the export to the browser if the * user is exporting the report. * * @return void */ public function run() { // Initialize the tables and the filters $this->table_init(); $this->filter_init(); if ($this->filter instanceof mr_html_filter) { $this->filter->set_report($this); } // Determine if we are doing AJAX if (!$this->is_exporting() and $this->config->ajax and $this->preferences->get('forceajax', $this->config->ajaxdefault)) { if (optional_param('tjson', 0, PARAM_BOOL)) { // Filling on AJAX request $this->table_fill(); } } else { // Normal fill... $this->table_fill(); } // If exporting, send it to the browser if ($this->is_exporting()) { $this->export->send(); } }