+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
),
'membership_type_id' => array(
'title' => ts('Membership Type'),
),
'membership_type_id' => array(
'title' => ts('Membership Type'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Member_PseudoConstant::membershipType(),
),
'status_id' => array(
'title' => ts('Membership Status'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Member_PseudoConstant::membershipType(),
),
'status_id' => array(
'title' => ts('Membership Status'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Member_PseudoConstant::membershipStatus(NULL, NULL, 'label'),
),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Member_PseudoConstant::membershipStatus(NULL, NULL, 'label'),
),
'title' => ts('Campaign'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => $this->activeCampaigns,
'title' => ts('Campaign'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => $this->activeCampaigns,
- $this->_groupBy = 'GROUP BY ' . implode(', ', $this->_groupBy) .
+ $groupFromSelect = CRM_Contact_BAO_Query::getGroupByFromSelectColumns($this->_selectClauses, $this->_groupBy);
+ $this->_groupBy = 'GROUP BY ' . implode(', ', $this->_groupBy) . $groupFromSelect .
- $this->_groupBy = "GROUP BY {$this->_aliases['civicrm_membership']}.join_date";
+ $groupFromSelect = CRM_Contact_BAO_Query::getGroupByFromSelectColumns($this->_selectClauses, "{$this->_aliases['civicrm_membership']}.join_date");
+ $this->_groupBy = "GROUP BY {$this->_aliases['civicrm_membership']}.join_date {$groupFromSelect}";