CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Phone filter in reports, can it be done?
Pages: [1]

Author Topic: Phone filter in reports, can it be done?  (Read 491 times)

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Phone filter in reports, can it be done?
March 25, 2012, 09:58:00 pm
I'd like to add a phone filter to a report.  Maybe I'm missing something easy, but it doesn't seem to be available.   Did I screw up a syntax?

This isn't working:
Code: [Select]
                   'civicrm_phone' =>
                   array( 'dao'       => 'CRM_Core_DAO_Phone',
                          'fields'    =>
                          array( 'phone'  => null),
                          'grouping'  => 'contact-fields',
                          ),
                           
                          'filters'   =>             
                          array( 'phone' =>
                                 array( 'title'   => ts( 'Phone' ) )
                               ),
                         

                   );

The point of this exercise is to use the NULL and IS NOT NULL for phone, so that the report only shows people with phone numbers.
Try CiviTeacher: the online video tutorial CiviCRM learning library.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Phone filter in reports, can it be done?
March 27, 2012, 01:01:19 pm
Does that filter give you the option to choose filters like 'Equals' & 'Does Not Equal' - if so try choosing Does not equal with no value
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: Phone filter in reports, can it be done?
March 27, 2012, 03:00:38 pm
The filter doesn't work, period, unfortunately.  The code above produces a non-recoverable error. 

My question is this: do phone filters exist, and if so, what is the code to make a phone filter?
Try CiviTeacher: the online video tutorial CiviCRM learning library.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Phone filter in reports, can it be done?

This forum was archived on 2017-11-26.