$showCharts = false; } } else { $showCharts = false; } $list_report_form->assign("SHOWCHARTS", $showCharts); } //Monolithic Changes Ends // Performance Optimization: Direct output of the report result if ($_REQUEST['submode'] == 'generateReport' && empty($advft_criteria)) { $filtersql = ''; } $sshtml = array(); $totalhtml = ''; $list_report_form->assign("DIRECT_OUTPUT", true); $list_report_form->assign_by_ref("__REPORT_RUN_INSTANCE", $oReportRun); $list_report_form->assign_by_ref("__REPORT_RUN_FILTER_SQL", $filtersql); //Ends $ogReport->getPriModuleColumnsList($ogReport->primodule); $ogReport->getSecModuleColumnsList($ogReport->secmodule); $ogReport->getAdvancedFilterList($reportid); $COLUMNS_BLOCK = getPrimaryColumns_AdvFilter_HTML($ogReport->primodule, $ogReport); $COLUMNS_BLOCK .= getSecondaryColumns_AdvFilter_HTML($ogReport->secmodule, $ogReport); $list_report_form->assign("COLUMNS_BLOCK", $COLUMNS_BLOCK); $FILTER_OPTION = Reports::getAdvCriteriaHTML(); $list_report_form->assign("FOPTION", $FILTER_OPTION); $rel_fields = $ogReport->adv_rel_fields; $list_report_form->assign("REL_FIELDS", Zend_Json::encode($rel_fields)); $list_report_form->assign("CRITERIA_GROUPS", $ogReport->advft_criteria); $list_report_form->assign("MOD", $mod_strings); $list_report_form->assign("APP", $app_strings);
} if (isPermitted("{$mod}", 'Export', '') != 'yes') { $modules_export_permitted = false; } } if (isPermitted($primarymodule, 'index') == "yes" && $modules_permitted == true) { $oReportRun = new ReportRun($reportid); $filterlist = $oReportRun->RunTimeFilter($filtercolumn, $filter, $startdate, $enddate); // Performance Optimization: Direct output of the report result $list_report_form = new vtigerCRM_Smarty(); //$sshtml = $oReportRun->GenerateReport("HTML",$filterlist); //if(is_array($sshtml))$totalhtml = $oReportRun->GenerateReport("TOTALHTML",$filterlist); $sshtml = array(); $totalhtml = ''; $list_report_form->assign("DIRECT_OUTPUT", true); $list_report_form->assign_by_ref("__REPORT_RUN_INSTANCE", $oReportRun); $list_report_form->assign_by_ref("__REPORT_RUN_FILTER_LIST", $filterlist); // END $ogReport->getSelectedStandardCriteria($reportid); //commented to omit dashboards for vtiger_reports //require_once('modules/Dashboard/ReportsCharts.php'); //$image = get_graph_by_type('Report','Report',$primarymodule,'',$sshtml[2]); //$list_report_form->assign("GRAPH", $image); $BLOCK1 = getPrimaryStdFilterHTML($ogReport->primodule, $ogReport->stdselectedcolumn); $BLOCK1 .= getSecondaryStdFilterHTML($ogReport->secmodule, $ogReport->stdselectedcolumn); // Check if selectedcolumn is found in the filters (Fix for ticket #4866) $selectedcolumnvalue = '"' . decode_html($ogReport->stdselectedcolumn) . '"'; if (!$is_admin && isset($ogReport->stdselectedcolumn) && strpos($BLOCK1, $selectedcolumnvalue) === false) { $BLOCK1 .= "<option selected value='Not Accessible'>" . $app_strings['LBL_NOT_ACCESSIBLE'] . "</option>"; } $list_report_form->assign("BLOCK1", $BLOCK1);