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) »
  • Error in Custom Report Assistance needed Please
Pages: [1]

Author Topic: Error in Custom Report Assistance needed Please  (Read 637 times)

FrTommy

  • I post frequently
  • ***
  • Posts: 273
  • Karma: 2
  • CiviCRM version: 4.5.x
  • CMS version: Drupal 7.x
  • MySQL version: 5.5.32
  • PHP version: 5.3
Error in Custom Report Assistance needed Please
January 08, 2012, 02:20:05 pm
I created a custom report back in civi 3.x and it was working beautifully. I recently upgraded to d7 and c4 which i love dearly!!. however I just realized that the custom report doesn't work now. I went in and did a diff on the custom report and Activity Summary report from c4 which is what i built the custom report on originally. I made a few changes in the file but still am getting an error. I'm at a loss as to where to begin. Could someone take a look at my report and help me out?

The error occurs when I go to CiviReport > Create report from template  and attempt to create a report from the template.

This is the error
Fatal error: require_once() [function.require]: Failed opening required '.php' (include_path='/home/USERNAME/DOMAIN.org/civicrm_custom_php:.:/home/USERNAME/DOMAIN.org/sites/all/modules/civicrm/:/home/USERNAME/DOMAIN.org/sites/all/modules/civicrm//packages:.:/usr/local/lib/php:/usr/local/php5/lib/pear') in /home/USERNAME/DOMAIN.org/sites/all/modules/civicrm/CRM/Report/Form.php on line 354

Line 354 from form.php is this:
Code: [Select]
<?php
           
// higher preference to bao object

            
if ( array_key_exists('bao', $table) ) {

                require_once 
str_replace( '_', DIRECTORY_SEPARATOR, $table['bao'] . '.php' );

                eval( 
"\$expFields = {$table['bao']}::exportableFields( );");

            } else {

                require_once 
str_replace( '_', DIRECTORY_SEPARATOR, $table['dao'] . '.php' );  //THIS IS LINE 354

                
eval( "\$expFields = {$table['dao']}::export( );");

            }
?>


I have OCCActivitySummary.php in my custom_php directory


I have OCCActivitySummary.tpl in my custom_template directory


My suspicion is that the error is when I call the custom field at around Line 147 in the php file.

Code: [Select]
<?php
// I believe that custom_2 is translated into number_in_attendance_2 by the custom table processing code

   
$this->_columns['civicrm_value_additional_info_2']['fields']['custom_2']['required'] = true;

   
$this->_columns['civicrm_value_additional_info_2']['fields']['custom_2']['statistics'] = array('sum' => ts( 'Total Attendance' ) );

?>


FrTommy

  • I post frequently
  • ***
  • Posts: 273
  • Karma: 2
  • CiviCRM version: 4.5.x
  • CMS version: Drupal 7.x
  • MySQL version: 5.5.32
  • PHP version: 5.3
Re: Error in Custom Report Assistance needed Please
January 08, 2012, 03:25:50 pm
Why is it always something extremely simple?

I just needed to go into the custom field and set it to searchable under the Custom Data.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviReport (Moderator: Dave Greenberg) »
  • Error in Custom Report Assistance needed Please

This forum was archived on 2017-11-26.