4 +--------------------------------------------------------------------+
5 | CiviCRM version 4.6 |
6 +--------------------------------------------------------------------+
7 | Copyright CiviCRM LLC (c) 2004-2014 |
8 +--------------------------------------------------------------------+
9 | This file is a part of CiviCRM. |
11 | CiviCRM is free software; you can copy, modify, and distribute it |
12 | under the terms of the GNU Affero General Public License |
13 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
15 | CiviCRM is distributed in the hope that it will be useful, but |
16 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. |
20 | You should have received a copy of the GNU Affero General Public |
21 | License and the CiviCRM Licensing Exception along |
22 | with this program; if not, contact CiviCRM LLC |
23 | at info[AT]civicrm[DOT]org. If you have questions about the |
24 | GNU Affero General Public License or the licensing of CiviCRM, |
25 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
26 +--------------------------------------------------------------------+
32 * @copyright CiviCRM LLC (c) 2004-2014
36 class CRM_Report_Form_Event_ParticipantListing
extends CRM_Report_Form_Event
{
38 protected $_summary = NULL;
40 protected $_contribField = FALSE;
41 protected $_lineitemField = FALSE;
42 protected $_groupFilter = TRUE;
43 protected $_tagFilter = TRUE;
44 protected $activeCampaigns;
46 protected $_customGroupExtends = array(
53 public $_drilldownReport = array('event/income' => 'Link to Detail Report');
61 public function __construct() {
62 $this->_autoIncludeIndexedFieldsAsOrderBys
= 1;
64 // Check if CiviCampaign is a) enabled and b) has active campaigns
65 $config = CRM_Core_Config
::singleton();
66 $campaignEnabled = in_array("CiviCampaign", $config->enableComponents
);
67 if ($campaignEnabled) {
68 $getCampaigns = CRM_Campaign_BAO_Campaign
::getPermissionedCampaigns(NULL, NULL, TRUE, FALSE, TRUE);
69 $this->activeCampaigns
= $getCampaigns['campaigns'];
70 asort($this->activeCampaigns
);
73 $this->_columns
= array(
74 'civicrm_contact' => array(
75 'dao' => 'CRM_Contact_DAO_Contact',
77 'sort_name_linked' => array(
78 'title' => ts('Participant Name'),
81 'dbAlias' => 'contact_civireport.sort_name',
83 'first_name' => array(
84 'title' => ts('First Name'),
87 'title' => ts('Last Name'),
94 'title' => ts('Gender'),
96 'birth_date' => array(
97 'title' => ts('Birth Date'),
100 'title' => ts('Age'),
101 'dbAlias' => 'TIMESTAMPDIFF(YEAR, contact_civireport.birth_date, CURDATE())',
103 'age_at_event' => array(
104 'title' => ts('Age at Event'),
105 'dbAlias' => 'TIMESTAMPDIFF(YEAR, contact_civireport.birth_date, event_civireport.start_date)',
107 'employer_id' => array(
108 'title' => ts('Organization'),
111 'grouping' => 'contact-fields',
112 'order_bys' => array(
113 'sort_name' => array(
114 'title' => ts('Last Name, First Name'),
116 'default_weight' => '0',
117 'default_order' => 'ASC',
119 'gender_id' => array(
120 'name' => 'gender_id',
121 'title' => ts('Gender'),
123 'birth_date' => array(
124 'name' => 'birth_date',
125 'title' => ts('Birth Date'),
127 'age_at_event' => array(
128 'name' => 'age_at_event',
129 'title' => ts('Age at Event'),
133 'sort_name' => array(
134 'title' => ts('Participant Name'),
135 'operator' => 'like',
137 'gender_id' => array(
138 'title' => ts('Gender'),
139 'operatorType' => CRM_Report_Form
::OP_MULTISELECT
,
140 'options' => CRM_Core_PseudoConstant
::get('CRM_Contact_DAO_Contact', 'gender_id'),
142 'birth_date' => array(
143 'title' => 'Birth Date',
144 'operatorType' => CRM_Report_Form
::OP_DATE
,
145 'type' => CRM_Utils_Type
::T_DATE
,
149 'civicrm_email' => array(
150 'dao' => 'CRM_Core_DAO_Email',
153 'title' => ts('Email'),
157 'grouping' => 'contact-fields',
160 'title' => ts('Participant E-mail'),
161 'operator' => 'like',
165 'civicrm_address' => array(
166 'dao' => 'CRM_Core_DAO_Address',
168 'street_address' => NULL,
170 'postal_code' => NULL,
171 'state_province_id' => array(
172 'title' => ts('State/Province'),
174 'country_id' => array(
175 'title' => ts('Country'),
178 'grouping' => 'contact-fields',
180 'civicrm_participant' => array(
181 'dao' => 'CRM_Event_DAO_Participant',
183 'participant_id' => array('title' => 'Participant ID'),
184 'participant_record' => array(
186 'no_display' => TRUE,
191 'type' => CRM_Utils_Type
::T_STRING
,
193 'status_id' => array(
194 'title' => ts('Status'),
198 'title' => ts('Role'),
201 'fee_currency' => array(
203 'no_display' => TRUE,
205 'participant_fee_level' => NULL,
206 'participant_fee_amount' => NULL,
207 'participant_register_date' => array('title' => ts('Registration Date')),
209 'grouping' => 'event-fields',
212 'name' => 'event_id',
213 'title' => ts('Event'),
214 'operatorType' => CRM_Report_Form
::OP_ENTITYREF
,
215 'type' => CRM_Utils_Type
::T_INT
,
216 'attributes' => array(
218 'select' => array('minimumInputLength' => 0),
222 'name' => 'status_id',
223 'title' => ts('Participant Status'),
224 'operatorType' => CRM_Report_Form
::OP_MULTISELECT
,
225 'options' => CRM_Event_PseudoConstant
::participantStatus(NULL, NULL, 'label'),
229 'title' => ts('Participant Role'),
230 'operatorType' => CRM_Report_Form
::OP_MULTISELECT
,
231 'options' => CRM_Event_PseudoConstant
::participantRole(),
233 'participant_register_date' => array(
234 'title' => 'Registration Date',
235 'operatorType' => CRM_Report_Form
::OP_DATE
,
237 'fee_currency' => array(
238 'title' => ts('Fee Currency'),
239 'operatorType' => CRM_Report_Form
::OP_MULTISELECT
,
240 'options' => CRM_Core_OptionGroup
::values('currencies_enabled'),
242 'type' => CRM_Utils_Type
::T_STRING
,
246 'order_bys' => array(
247 'participant_register_date' => array(
248 'title' => ts('Registration Date'),
249 'default_weight' => '1',
250 'default_order' => 'ASC',
253 'title' => ts('Event'),
254 'default_weight' => '1',
255 'default_order' => 'ASC',
259 'civicrm_phone' => array(
260 'dao' => 'CRM_Core_DAO_Phone',
263 'title' => ts('Phone'),
268 'grouping' => 'contact-fields',
270 'civicrm_event' => array(
271 'dao' => 'CRM_Event_DAO_Event',
273 'event_type_id' => array('title' => ts('Event Type')),
274 'event_start_date' => array('title' => ts('Event Start Date')),
276 'grouping' => 'event-fields',
279 'name' => 'event_type_id',
280 'title' => ts('Event Type'),
281 'operatorType' => CRM_Report_Form
::OP_MULTISELECT
,
282 'options' => CRM_Core_OptionGroup
::values('event_type'),
284 'event_start_date' => array(
285 'title' => ts('Event Start Date'),
286 'operatorType' => CRM_Report_Form
::OP_DATE
,
289 'order_bys' => array(
290 'event_type_id' => array(
291 'title' => ts('Event Type'),
292 'default_weight' => '2',
293 'default_order' => 'ASC',
297 'civicrm_contribution' => array(
298 'dao' => 'CRM_Contribute_DAO_Contribution',
300 'contribution_id' => array(
302 'no_display' => TRUE,
304 'csv_display' => TRUE,
305 'title' => ts('Contribution ID'),
307 'financial_type_id' => array('title' => ts('Financial Type')),
308 'receive_date' => array('title' => ts('Payment Date')),
309 'contribution_status_id' => array('title' => ts('Contribution Status')),
310 'payment_instrument_id' => array('title' => ts('Payment Type')),
311 'contribution_source' => array(
313 'title' => ts('Contribution Source'),
317 'no_display' => TRUE,
320 'fee_amount' => array('title' => ts('Transaction Fee')),
321 'net_amount' => NULL,
323 'grouping' => 'contrib-fields',
325 'receive_date' => array(
326 'title' => 'Payment Date',
327 'operatorType' => CRM_Report_Form
::OP_DATE
,
329 'financial_type_id' => array(
330 'title' => ts('Financial Type'),
331 'operatorType' => CRM_Report_Form
::OP_MULTISELECT
,
332 'options' => CRM_Contribute_PseudoConstant
::financialType(),
335 'title' => ts('Contribution Currency'),
336 'operatorType' => CRM_Report_Form
::OP_MULTISELECT
,
337 'options' => CRM_Core_OptionGroup
::values('currencies_enabled'),
339 'type' => CRM_Utils_Type
::T_STRING
,
341 'payment_instrument_id' => array(
342 'title' => ts('Payment Type'),
343 'operatorType' => CRM_Report_Form
::OP_MULTISELECT
,
344 'options' => CRM_Contribute_PseudoConstant
::paymentInstrument(),
346 'contribution_status_id' => array(
347 'title' => ts('Contribution Status'),
348 'operatorType' => CRM_Report_Form
::OP_MULTISELECT
,
349 'options' => CRM_Contribute_PseudoConstant
::contributionStatus(),
354 'civicrm_line_item' => array(
355 'dao' => 'CRM_Price_DAO_LineItem',
356 'grouping' => 'priceset-fields',
358 'price_field_value_id' => array(
359 'name' => 'price_field_value_id',
360 'title' => ts('Fee Level'),
361 'operatorType' => CRM_Report_Form
::OP_MULTISELECT
,
362 'options' => $this->getPriceLevels(),
368 $this->_options
= array(
369 'blank_column_begin' => array(
370 'title' => ts('Blank column at the Begining'),
371 'type' => 'checkbox',
373 'blank_column_end' => array(
374 'title' => ts('Blank column at the End'),
385 // If we have active campaigns add those elements to both the fields and filters
386 if ($campaignEnabled && !empty($this->activeCampaigns
)) {
387 $this->_columns
['civicrm_participant']['fields']['campaign_id'] =
389 'title' => ts('Campaign'),
390 'default' => 'false',
392 $this->_columns
['civicrm_participant']['filters']['campaign_id'] =
394 'title' => ts('Campaign'),
395 'operatorType' => CRM_Report_Form
::OP_MULTISELECT
,
396 'options' => $this->activeCampaigns
,
398 $this->_columns
['civicrm_participant']['order_bys']['campaign_id'] =
399 array('title' => ts('Campaign'));
403 $this->_currencyColumn
= 'civicrm_participant_fee_currency';
404 parent
::__construct();
410 public function getPriceLevels() {
412 SELECT CONCAT(cv.label, ' (', ps.title, ')') label, cv.id
413 FROM civicrm_price_field_value cv
414 LEFT JOIN civicrm_price_field cf
415 ON cv.price_field_id = cf.id
416 LEFT JOIN civicrm_price_set_entity ce
417 ON ce.price_set_id = cf.price_set_id
418 LEFT JOIN civicrm_price_set ps
419 ON ce.price_set_id = ps.id
420 WHERE ce.entity_table = 'civicrm_event'
423 $dao = CRM_Core_DAO
::executeQuery($query);
425 while ($dao->fetch()) {
426 $elements[$dao->id
] = "$dao->label\n";
430 } //searches database for priceset values
433 public function preProcess() {
434 parent
::preProcess();
437 public function select() {
439 $this->_columnHeaders
= array();
441 //add blank column at the Start
442 if (array_key_exists('options', $this->_params
) &&
443 !empty($this->_params
['options']['blank_column_begin'])
445 $select[] = " '' as blankColumnBegin";
446 $this->_columnHeaders
['blankColumnBegin']['title'] = '_ _ _ _';
448 foreach ($this->_columns
as $tableName => $table) {
449 if ($tableName == 'civicrm_line_item') {
450 $this->_lineitemField
= TRUE;
452 if (array_key_exists('fields', $table)) {
453 foreach ($table['fields'] as $fieldName => $field) {
454 if (!empty($field['required']) ||
455 !empty($this->_params
['fields'][$fieldName])
457 if ($tableName == 'civicrm_contribution') {
458 $this->_contribField
= TRUE;
461 $alias = "{$tableName}_{$fieldName}";
462 $select[] = "{$field['dbAlias']} as $alias";
463 $this->_columnHeaders
["{$tableName}_{$fieldName}"]['type'] = CRM_Utils_Array
::value('type', $field);
464 $this->_columnHeaders
["{$tableName}_{$fieldName}"]['no_display'] = CRM_Utils_Array
::value('no_display', $field);
465 $this->_columnHeaders
["{$tableName}_{$fieldName}"]['title'] = CRM_Utils_Array
::value('title', $field);
466 $this->_selectAliases
[] = $alias;
471 //add blank column at the end
472 $blankcols = CRM_Utils_Array
::value('blank_column_end', $this->_params
);
474 for ($i = 1; $i <= $blankcols; $i++
) {
475 $select[] = " '' as blankColumnEnd_{$i}";
476 $this->_columnHeaders
["blank_{$i}"]['title'] = "_ _ _ _";
480 $this->_select
= "SELECT " . implode(', ', $select) . " ";
490 public static function formRule($fields, $files, $self) {
491 $errors = $grouping = array();
495 public function from() {
497 FROM civicrm_participant {$this->_aliases['civicrm_participant']}
498 LEFT JOIN civicrm_event {$this->_aliases['civicrm_event']}
499 ON ({$this->_aliases['civicrm_event']}.id = {$this->_aliases['civicrm_participant']}.event_id ) AND
500 {$this->_aliases['civicrm_event']}.is_template = 0
501 LEFT JOIN civicrm_contact {$this->_aliases['civicrm_contact']}
502 ON ({$this->_aliases['civicrm_participant']}.contact_id = {$this->_aliases['civicrm_contact']}.id )
504 LEFT JOIN civicrm_address {$this->_aliases['civicrm_address']}
505 ON {$this->_aliases['civicrm_contact']}.id = {$this->_aliases['civicrm_address']}.contact_id AND
506 {$this->_aliases['civicrm_address']}.is_primary = 1
507 LEFT JOIN civicrm_email {$this->_aliases['civicrm_email']}
508 ON ({$this->_aliases['civicrm_contact']}.id = {$this->_aliases['civicrm_email']}.contact_id AND
509 {$this->_aliases['civicrm_email']}.is_primary = 1)
510 LEFT JOIN civicrm_phone {$this->_aliases['civicrm_phone']}
511 ON {$this->_aliases['civicrm_contact']}.id = {$this->_aliases['civicrm_phone']}.contact_id AND
512 {$this->_aliases['civicrm_phone']}.is_primary = 1
514 if ($this->_contribField
) {
516 LEFT JOIN civicrm_participant_payment pp
517 ON ({$this->_aliases['civicrm_participant']}.id = pp.participant_id)
518 LEFT JOIN civicrm_contribution {$this->_aliases['civicrm_contribution']}
519 ON (pp.contribution_id = {$this->_aliases['civicrm_contribution']}.id)
522 if ($this->_lineitemField
) {
524 LEFT JOIN civicrm_line_item line_item_civireport
525 ON line_item_civireport.entity_table = 'civicrm_participant' AND
526 line_item_civireport.entity_id = {$this->_aliases['civicrm_participant']}.id
531 public function where() {
533 foreach ($this->_columns
as $tableName => $table) {
534 if (array_key_exists('filters', $table)) {
535 foreach ($table['filters'] as $fieldName => $field) {
538 if (CRM_Utils_Array
::value('type', $field) & CRM_Utils_Type
::T_DATE
) {
539 $relative = CRM_Utils_Array
::value("{$fieldName}_relative", $this->_params
);
540 $from = CRM_Utils_Array
::value("{$fieldName}_from", $this->_params
);
541 $to = CRM_Utils_Array
::value("{$fieldName}_to", $this->_params
);
543 if ($relative ||
$from ||
$to) {
544 $clause = $this->dateClause($field['name'], $relative, $from, $to, $field['type']);
548 $op = CRM_Utils_Array
::value("{$fieldName}_op", $this->_params
);
550 if ($fieldName == 'rid') {
551 $value = CRM_Utils_Array
::value("{$fieldName}_value", $this->_params
);
552 if (!empty($value)) {
553 $clause = "( {$field['dbAlias']} REGEXP '[[:<:]]" .
554 implode('[[:>:]]|[[:<:]]', $value) . "[[:>:]]' )";
560 $clause = $this->whereClause($field,
562 CRM_Utils_Array
::value("{$fieldName}_value", $this->_params
),
563 CRM_Utils_Array
::value("{$fieldName}_min", $this->_params
),
564 CRM_Utils_Array
::value("{$fieldName}_max", $this->_params
)
569 if (!empty($clause)) {
570 $clauses[] = $clause;
575 if (empty($clauses)) {
576 $this->_where
= "WHERE {$this->_aliases['civicrm_participant']}.is_test = 0 ";
580 "WHERE {$this->_aliases['civicrm_participant']}.is_test = 0 AND " .
581 implode(' AND ', $clauses);
583 if ($this->_aclWhere
) {
584 $this->_where
.= " AND {$this->_aclWhere} ";
588 public function groupBy() {
589 $this->_groupBy
= "GROUP BY {$this->_aliases['civicrm_participant']}.id";
592 public function postProcess() {
594 // get ready with post process params
595 $this->beginPostProcess();
597 // get the acl clauses built before we assemble the query
598 $this->buildACLClause($this->_aliases
['civicrm_contact']);
600 $sql = $this->buildQuery(TRUE);
602 // build array of result based on column headers. This method also allows
603 // modifying column headers before using it to build result set i.e $rows.
605 $this->buildRows($sql, $rows);
607 // format result set.
608 $this->formatDisplay($rows);
610 // assign variables to templates
611 $this->doTemplateAssignment($rows);
613 // do print / pdf / instance stuff if needed
614 $this->endPostProcess($rows);
625 private function _initBasicRow(&$rows, &$entryFound, $row, $rowId, $rowNum, $types) {
626 if (!array_key_exists($rowId, $row)) {
630 $value = $row[$rowId];
632 $rows[$rowNum][$rowId] = $types[$value];
640 public function alterDisplay(&$rows) {
641 // custom code to alter rows
644 $eventType = CRM_Core_OptionGroup
::values('event_type');
646 $financialTypes = CRM_Contribute_PseudoConstant
::financialType();
647 $contributionStatus = CRM_Contribute_PseudoConstant
::contributionStatus();
648 $paymentInstruments = CRM_Contribute_PseudoConstant
::paymentInstrument();
649 $genders = CRM_Core_PseudoConstant
::get('CRM_Contact_DAO_Contact', 'gender_id', array('localize' => TRUE));
651 foreach ($rows as $rowNum => $row) {
652 // make count columns point to detail report
653 // convert display name to links
654 if (array_key_exists('civicrm_participant_event_id', $row)) {
655 $eventId = $row['civicrm_participant_event_id'];
657 $rows[$rowNum]['civicrm_participant_event_id'] = CRM_Event_PseudoConstant
::event($eventId, FALSE);
659 $url = CRM_Report_Utils_Report
::getNextUrl('event/income',
660 'reset=1&force=1&id_op=in&id_value=' . $eventId,
661 $this->_absoluteUrl
, $this->_id
, $this->_drilldownReport
663 $rows[$rowNum]['civicrm_participant_event_id_link'] = $url;
664 $rows[$rowNum]['civicrm_participant_event_id_hover'] = ts("View Event Income Details for this Event");
669 // handle event type id
670 $this->_initBasicRow($rows, $entryFound, $row, 'civicrm_event_event_type_id', $rowNum, $eventType);
672 // handle participant status id
673 if (array_key_exists('civicrm_participant_status_id', $row)) {
674 $statusId = $row['civicrm_participant_status_id'];
676 $rows[$rowNum]['civicrm_participant_status_id'] = CRM_Event_PseudoConstant
::participantStatus($statusId, FALSE, 'label');
681 // handle participant role id
682 if (array_key_exists('civicrm_participant_role_id', $row)) {
683 $roleId = $row['civicrm_participant_role_id'];
685 $roles = explode(CRM_Core_DAO
::VALUE_SEPARATOR
, $roleId);
687 foreach ($roles as $role) {
688 $roleId[$role] = CRM_Event_PseudoConstant
::participantRole($role, FALSE);
690 $rows[$rowNum]['civicrm_participant_role_id'] = implode(', ', $roleId);
695 // Handel value seperator in Fee Level
696 if (array_key_exists('civicrm_participant_participant_fee_level', $row)) {
697 $feeLevel = $row['civicrm_participant_participant_fee_level'];
699 CRM_Event_BAO_Participant
::fixEventLevel($feeLevel);
700 $rows[$rowNum]['civicrm_participant_participant_fee_level'] = $feeLevel;
705 // Convert display name to link
706 $displayName = CRM_Utils_Array
::value('civicrm_contact_sort_name_linked', $row);
707 $cid = CRM_Utils_Array
::value('civicrm_contact_id', $row);
708 $id = CRM_Utils_Array
::value('civicrm_participant_participant_record', $row);
710 if ($displayName && $cid && $id) {
711 $url = CRM_Report_Utils_Report
::getNextUrl('contact/detail',
712 "reset=1&force=1&id_op=eq&id_value=$cid",
713 $this->_absoluteUrl
, $this->_id
, $this->_drilldownReport
716 $viewUrl = CRM_Utils_System
::url("civicrm/contact/view/participant",
717 "reset=1&id=$id&cid=$cid&action=view&context=participant"
720 $contactTitle = ts('View Contact Details');
721 $participantTitle = ts('View Participant Record');
723 $rows[$rowNum]['civicrm_contact_sort_name_linked'] = "<a title='$contactTitle' href=$url>$displayName</a>";
724 if ($this->_outputMode
!== 'csv') {
725 $rows[$rowNum]['civicrm_contact_sort_name_linked'] .=
726 "<span style='float: right;'><a title='$participantTitle' href=$viewUrl>" .
727 ts('View') . "</a></span>";
733 if (array_key_exists('civicrm_address_country_id', $row)) {
734 $countryId = $row['civicrm_address_country_id'];
736 $rows[$rowNum]['civicrm_address_country_id'] = CRM_Core_PseudoConstant
::country($countryId, TRUE);
741 // Handle state/province id
742 if (array_key_exists('civicrm_address_state_province_id', $row)) {
743 $provinceId = $row['civicrm_address_state_province_id'];
745 $rows[$rowNum]['civicrm_address_state_province_id'] = CRM_Core_PseudoConstant
::stateProvince($provinceId, TRUE);
750 // Handle employer id
751 if (array_key_exists('civicrm_contact_employer_id', $row)) {
752 $employerId = $row['civicrm_contact_employer_id'];
754 $rows[$rowNum]['civicrm_contact_employer_id'] = CRM_Contact_BAO_Contact
::displayName($employerId);
755 $url = CRM_Utils_System
::url('civicrm/contact/view',
756 'reset=1&cid=' . $employerId, $this->_absoluteUrl
758 $rows[$rowNum]['civicrm_contact_employer_id_link'] = $url;
759 $rows[$rowNum]['civicrm_contact_employer_id_hover'] = ts('View Contact Summary for this Contact.');
763 // Convert campaign_id to campaign title
764 $this->_initBasicRow($rows, $entryFound, $row, 'civicrm_participant_campaign_id', $rowNum, $this->activeCampaigns
);
766 // handle contribution status
767 $this->_initBasicRow($rows, $entryFound, $row, 'civicrm_contribution_contribution_status_id', $rowNum, $contributionStatus);
769 // handle payment instrument
770 $this->_initBasicRow($rows, $entryFound, $row, 'civicrm_contribution_payment_instrument_id', $rowNum, $paymentInstruments);
772 // handle financial type
773 $this->_initBasicRow($rows, $entryFound, $row, 'civicrm_contribution_financial_type_id', $rowNum, $financialTypes);
776 $this->_initBasicRow($rows, $entryFound, $row, 'civicrm_contact_gender_id', $rowNum, $genders);
778 // display birthday in the configured custom format
779 if (array_key_exists('civicrm_contact_birth_date', $row)) {
780 $birthDate = $row['civicrm_contact_birth_date'];
782 $rows[$rowNum]['civicrm_contact_birth_date'] = CRM_Utils_Date
::customFormat($birthDate, '%Y%m%d');
787 // skip looking further in rows, if first row itself doesn't
788 // have the column we need