コード例 #1
0
ファイル: view.detail.php プロジェクト: jglaine/sugar761-ent
 /**
  * display
  *
  */
 function display()
 {
     parent::display();
     global $current_user, $app_strings, $mod_strings;
     if (isset($this->bean->query_id) && !empty($this->bean->query_id)) {
         //CHECK FOR SUB-QUERIES
         $this->bean->check_interlock();
         //OUTPUT THE DATASET
         $data_set = BeanFactory::getBean('CustomQueries', $this->bean->query_id);
         $QueryView = new ReportListView();
         $QueryView->initNewXTemplate('modules/CustomQueries/QueryView.html', $mod_strings);
         $QueryView->setHeaderTitle($this->bean->name);
         //below: make sure to aquire the custom layout headers if available
         $QueryView->export_type = "Ent";
         $QueryView->xTemplateAssign('EDIT_INLINE', SugarThemeRegistry::current()->getImage('edit_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_EDIT']));
         $QueryView->xTemplateAssign('LEFTARROW_INLINE', SugarThemeRegistry::current()->getImage('calendar_previous', 'align="absmiddle" border="0"', null, null, '.gif', $mod_strings['LBL_LEFT']));
         $QueryView->xTemplateAssign('RIGHTARROW_INLINE', SugarThemeRegistry::current()->getImage('calendar_next', 'align="absmiddle" border="0"', null, null, '.gif', $mod_strings['LBL_RIGHT']));
         $QueryView->setup($data_set, $this->bean, "main", "CUSTOMQUERY");
         $query_results = $QueryView->processDataSet();
         if ($query_results['result'] == "Error") {
             if (is_admin($current_user)) {
                 echo "<font color=\"red\"><b>" . $query_results['result_msg'] . "" . $app_strings['ERROR_EXAMINE_MSG'] . "</font><BR>" . $query_results['msg'] . "</b>";
             } else {
                 echo "<font color=\"red\"><b>" . $query_results['result_msg'] . "</font></b><BR>";
             }
         }
         //end if there is even a query for the data set
     } else {
         echo "<font color=\"red\"><b>" . $app_strings['NO_QUERY_SELECTED'] . "</font></b><BR>";
     }
 }
コード例 #2
0
ファイル: DataSet.php プロジェクト: jglaine/sugar761-ent
 function process_interlock($list_array)
 {
     global $mod_strings;
     $sub_data_set = BeanFactory::getBean('DataSets', $this->sub_id);
     $sub_data_set->sub_query = true;
     //OUTPUT THE SUB-DATASET
     $data_set = BeanFactory::getBean('CustomQueries', $sub_data_set->query_id);
     $data_set->sub_query_array = $list_array;
     $SubView = new ReportListView();
     $SubView->initNewXTemplate('modules/CustomQueries/QueryView.html', $mod_strings);
     $SubView->setDisplayHeaderAndFooter(false);
     $SubView->setup($data_set, $sub_data_set, "main", "CUSTOMQUERY", true);
     return $SubView->processDataSet();
     //end function process_interlock
 }
コード例 #3
0
ファイル: ReportView.php プロジェクト: jglaine/sugar761-ent
 echo "<tr><td align=\"{$focus->report_align}\"> \n";
 if ($data_object->prespace_y == "on") {
     echo "<p><p>";
 }
 //CHECK FOR SUB-QUERIES
 $data_object->check_interlock();
 //first check to see if the data format actually has a query_id for it
 if (!empty($data_object->query_id) && $data_object->query_id != "") {
     //OUTPUT THE DATASET
     $data_set = BeanFactory::getBean('CustomQueries', $data_object->query_id);
     $QueryView = new ReportListView();
     //pass the previous width array if available
     if (isset($prev_width_array) && $prev_width_array != '') {
         $QueryView->prev_width_array = $prev_width_array;
     }
     $QueryView->initNewXTemplate('modules/CustomQueries/QueryView.html', $mod_strings);
     $QueryView->setDisplayHeaderAndFooter(false);
     $QueryView->setHeaderTitle($data_object->name);
     //below: make sure to aquire the custom layout headers if available
     $QueryView->export_type = "Ent";
     $QueryView->final_report_view = true;
     $QueryView->setup($data_set, $data_object, "main", "CUSTOMQUERY");
     $query_results = $QueryView->processDataSet();
     //capture previous width array if necessary
     $prev_width_array = $QueryView->prev_width_array;
     if ($query_results['result'] == "Error") {
         if (is_admin($current_user)) {
             echo "<font color=\"red\"><b>" . $query_results['result_msg'] . "" . $app_strings['ERROR_EXAMINE_MSG'] . "</font><BR>" . $query_results['msg'] . "</b>";
         } else {
             echo "<font color=\"red\"><b>" . $query_results['result_msg'] . "</font></b><BR>";
         }