CRM-19085 - Fix Add to Group Functionality in Reports
authorjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Thu, 14 Jul 2016 13:18:00 +0000 (18:48 +0530)
committerjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Thu, 14 Jul 2016 13:18:00 +0000 (18:48 +0530)
CRM/Report/Form.php

index c101e38c677461a777d6176675996b149316a607..82d7c1b4068c8a2b263b5b495c7f31414b1c31c4 100644 (file)
@@ -4602,6 +4602,7 @@ LEFT JOIN civicrm_contact {$field['alias']} ON {$field['alias']}.id = {$this->_a
    *   is that we might print a bar chart as a pdf.
    */
   protected function setOutputMode() {
+    $buttonName = $this->controller->getButtonName();
     $this->_outputMode = str_replace('report_instance.', '', CRM_Utils_Request::retrieve(
       'output',
       'String',
@@ -4612,6 +4613,9 @@ LEFT JOIN civicrm_contact {$field['alias']} ON {$field['alias']}.id = {$this->_a
     if (isset($this->_params['task'])) {
       unset($this->_params['task']);
     }
+    if ($this->_groupButtonName == $buttonName) {
+      $this->_outputMode = 'group';
+    }
   }
 
   /**