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) »
  • Support »
  • Using CiviCRM »
  • Using CiviReport (Moderator: Dave Greenberg) »
  • adding Event detail into bookkeeping report
Pages: [1]

Author Topic: adding Event detail into bookkeeping report  (Read 790 times)

superbogel

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
  • CiviCRM version: 4.3
  • CMS version: Drupal 7.23
  • MySQL version: mysql 5
  • PHP version: php 5
adding Event detail into bookkeeping report
October 22, 2013, 01:51:10 am
hello,

I am new to custom report in CRM and tried creating the custom report for bookkeeping report that consist of event name and event ID filter in the report criteria, so I try adding : custom field into the bookkeeping.php that is located already on the custom_php folder so I dont overwrite the core codes :

here is the code :
Code: [Select]
  function __construct() {
    $this->_columns = array(
      'civicrm_contact' =>
      array(
        'dao' => 'CRM_Contact_DAO_Contact',
        'fields' =>
        array(
          'sort_name' =>
          array('title' => ts('Contact Name'),
            'required' => TRUE,
            'no_repeat' => TRUE,
          ),
          'id' =>
          array(
            'no_display' => TRUE,
            'required' => TRUE,
          ),
        ),
        'filters' =>
        array(
          'sort_name' =>
          array('title' => ts('Contact Name'),
            'operator' => 'like',
          ),
          'id' =>
          array('title' => ts('Contact ID'),
            'no_display' => TRUE,
          ),
        ),
        'grouping' => 'contact-fields',
      ),
      'civicrm_membership' =>
      array(
        'dao' => 'CRM_Member_DAO_Membership',
        'fields' =>
        array(
          'id' =>
          array('title' => ts('Membership #'),
            'no_display' => TRUE,
            'required' => TRUE,
          ),
        ),
      ),
      'civicrm_event' =>
      array(
        'dao' => 'CRM_Event_DAO_Event',
        'fields' =>
        array(
          'event_type_id' =>
          array('title' => ts('Event Name'),
            'required' => TRUE,
            'no_repeat' => TRUE,
          ),
        ),
        'filters' =>
        array(
          'event_type_id' =>
          array('title' => ts('Event Name'),
            'operator' => 'like',
          ),
        ),
      ),

in the custom_php\CRM\Report\Form\Contribute\bookkeeping.php and it is showing like DB error field not found.

help me understand how can I add 2 fields in the bookkeeping that is event :
- Event Name – standard field in CiviCRM event table
- Event Accounting Code – custom field tied to events

the default instance should be : civicrm/report/instance/18?reset=1

I tried extending the group by adding :
Code: [Select]
protected $_customGroupExtends = array('Membership', 'Event');
well all the fields shows but filter in preview report throws error :( syntax error, which I dont prefer of showing all the event fields, instead I only need those 2 fields to get filtered.

can anyone share a clue here? do I need to create own clean template and query one by one? or we can just extend it?

thank you for taking the time to read my post

mtech

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
  • CiviCRM version: 4.4.4
  • CMS version: Joomla 2.5.18
  • MySQL version: 5.5.35
  • PHP version: 5.4.25
Re: adding Event detail into bookkeeping report
February 25, 2014, 04:49:16 pm
Did you find a solution to this?

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviReport (Moderator: Dave Greenberg) »
  • adding Event detail into bookkeeping report

This forum was archived on 2017-11-26.