Changes between Version 2 and Version 3 of CiviCRM GENVASC Report customisation


Ignore:
Timestamp:
03/08/13 16:52:39 (12 years ago)
Author:
Nick Holden
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CiviCRM GENVASC Report customisation

    v2 v3  
    11= Report customisation for GENVASC =
    22
    3 This was our first attempt at customising a CiviReport. We used the Case Detail report as the model.
     3This was our first attempt at customising a !CiviReport. We used the Case Detail report as the model.
    44
    55Two major issues:
    66
    7 * Firstly, the report needs to show the relationships of the case subject, specifically their GP surgery. This was acheived by having two entries in the $this->_columns array that use the same DAO, specifically the CRM_Contact_DAO_Contact DAO, one for the contact being reported on (the subject of the study enrollment) and one for the 'relation' in question, viz. the GP surgery.
     7Firstly, the report needs to show the relationships of the case subject, specifically their GP surgery. This was acheived by having two entries in the $this->_columns array that use the same DAO, specifically the CRM_Contact_DAO_Contact DAO, one for the contact being reported on (the subject of the study enrollment) and one for the 'relation' in question, viz. the GP surgery.
    88
    9 * Secondly, the report needs to include the practice 'C' code, which is custom data associated with the GP surgery contact. Simply using $_customGroupExtends to include custom data against Individuals, Cases, Organisations and Addresses doesn't work, because although they show up on the form, there is no way to specify that the search criteria shouldn't search for them against the subject of the case, but instead use the related GP surgery.
     9Secondly, the report needs to include the practice 'C' code, which is custom data associated with the GP surgery contact. Simply using $_customGroupExtends to include custom data against Individuals, Cases, Organisations and Addresses doesn't work, because although they show up on the form, there is no way to specify that the search criteria shouldn't search for them against the subject of the case, but instead use the related GP surgery.
    1010
    1111This is more difficult. Looking at the snippets of a 'DB error' generated below from the report template, it is evident that the search criteria include matching the civicrm_value_genvasc_recruitment_data_15 table (with an alias that is even longer) on the basis of matching the entity_id in that table to the id column in the case table in order to select the 'genvasc_site_ice_cod_37' and 'genvasc_id_38' values from it.