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) »
  • Unable to create custom report
Pages: [1]

Author Topic: Unable to create custom report  (Read 1923 times)

dharmatech

  • I post frequently
  • ***
  • Posts: 280
  • Karma: 53
    • dharmatech.org
Unable to create custom report
May 14, 2008, 11:22:59 am
Following the steps outlined here...
http://wiki.civicrm.org/confluence/display/CRMDOC/Custom+Search+Components

I tried copying ContributionAggregate to MajorDonors and make a few modifications.  After I added it to civicrm_option_value, I am unable to access the page with the csid I assigned it...  "Could not get details for custom search."

Interesting note, this query:
SELECT * FROM `civicrm_option_value` WHERE option_group_id = (SELECT id FROM civicrm_option_group WHERE name = 'custom_search')
returned NULL because civicrm_option_group was empty.

I am able to access the "default" custom reports by using the appropriate csid, but I'm a bit confused why the defaults reports don't show up in the civicrm_option_value/civicrm_option_group tables.

This is a CiviCRM 2.0.3 upgrade from 1.9.13.
http://dharmatech.org
oss@dharmatech.org
801.541.8671

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Unable to create custom report
May 14, 2008, 02:02:59 pm
Is civicrm_option_group table really "empty" (i.e. SELECT * FROM civicrm_option_group; returns an empty recordset)? If so, there's definitely a problem with the site (some failure during upgrade) - since this table should have approx 35 records in it.
Protect your investment in CiviCRM by  becoming a Member!

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Unable to create custom report
May 14, 2008, 02:08:35 pm

specifically option_group should have an entry for custom_search. i thought we missed this in the upgrade script, but went back and checked. it is there :)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

dharmatech

  • I post frequently
  • ***
  • Posts: 280
  • Karma: 53
    • dharmatech.org
Re: Unable to create custom report
May 14, 2008, 04:03:06 pm
Are the default custom reports somehow hardcoded into CiviCRM?

Sorry, I misspoke... it's not empty but custom_search wasn't in there until I added it by hand.  I do have 20 rows in civicrm_option_group.  civicrm_option_value doesn't have the other default custom searches, only the one I added.

I've got the problem somewhat cornered but I can't figure out why it's acting this way:
~line 67 in CRM/Contact/BAO/SearchCustom.php
$customSearchClass = CRM_Core_OptionGroup::getLabel( 'custom_search', $customSearchID );

$customSearchClass is NULL.  Tracing that back getLabel builds the correct query (running that generated query in mysql returns the correct result set), but for some reason fetch() doesn't seem to work.  Here's the DAO if that helps.

CRM_Core_DAO Object
(
    [_DB_DataObject_version] => 1.8.4
    [__table] =>
    [N] => 0
    [_database_dsn] =>
    [_database_dsn_md5] => 86bf2142b27df87f8d6cb161ecf3cba1
    [_database] => civicrm19fix
    [_query] => Array
        (
            [condition] =>
            [group_by] =>
            [order_by] =>
            [having] =>
            [limit_start] =>
            [limit_count] =>
            [data_select] => *
        )

    [_DB_resultid] => 3
    [_resultFields] =>
    [_link_loaded] =>
    [_join] =>
    [_lastError] =>
)
http://dharmatech.org
oss@dharmatech.org
801.541.8671

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Unable to create custom report
May 14, 2008, 07:47:50 pm

seems like something is not right with your db / option group,value table. the upgrade script puts in 5 of the default custom searches, so not sure why this is not being reflected in your db

what version of php are u running? can u also set daoDebug = 1 in CRM/Core/Config.php and see all the queries being issued

if u are still stuck after the above, get on IRC and i can help debug

thanx

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

dharmatech

  • I post frequently
  • ***
  • Posts: 280
  • Karma: 53
    • dharmatech.org
Re: Unable to create custom report
May 15, 2008, 02:10:55 pm
Thanks lobo... I decided to reload the option_group/value tables and it solved my problem.
http://dharmatech.org
oss@dharmatech.org
801.541.8671

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Unable to create custom report

This forum was archived on 2017-11-26.