getVar('_instanceValues'); if (!empty($instanceValue) && in_array( $instanceValue['report_id'], array( 'contact/summary', 'contact/detail', 'contact/currentEmployer', ) ) ) { if ($varType == 'sql') { $var->_columnHeaders['civicrm_contact_do_not_trade'] = array( 'type' => 1, 'title' => 'Constituent', 'no_display' => TRUE, ); $var->_select .= ' , contact_civireport.do_not_trade as civicrm_contact_do_not_trade '; $where = $var->getVar('_where'); $where .= ' AND contact_civireport.do_not_trade <> 1'; $var->setVar('_where', $where); } } }