Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-12348

Issue creating report based on a template

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.3.0
    • Fix Version/s: 4.3.1
    • Component/s: CiviReport
    • Labels:

      Description

      When creating a report based on a constituent detail report where filter is set for "is one of" with multiple smart groups selected yields the following error:

      backTrace

      #0 /home/pffco/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(148): CRM_Core_Error::backtrace()
      #1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
      #2 /home/pffco/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
      #3 /home/pffco/public_html/wp-content/plugins/civicrm/civicrm/packages/DB.php(969): PEAR_Error->PEAR_Error("DB Error: syntax error", -2, 16, (Array:2), "\nSELECT g.id\nFROM civicrm_group g\nWHERE ( g.saved_search_id IS NOT N...")
      #4 /home/pffco/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(564): DB_Error->DB_Error(-2, 16, (Array:2), "\nSELECT g.id\nFROM civicrm_group g\nWHERE ( g.saved_search_id IS NOT N...")
      #5 /home/pffco/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1905): PEAR->raiseError(NULL, -2, NULL, NULL, "\nSELECT g.id\nFROM civicrm_group g\nWHERE ( g.saved_search_id IS NOT N...", "DB_Error", TRUE)
      #6 /home/pffco/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php(898): DB_common->raiseError(-2, NULL, NULL, NULL, "1064 ** You have an error in your SQL syntax; check the manual that correspon...")
      #7 /home/pffco/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php(327): DB_mysql->mysqlRaiseError()
      #8 /home/pffco/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1216): DB_mysql->simpleQuery("\nSELECT g.id\nFROM civicrm_group g\nWHERE ( g.saved_search_id IS NOT N...")
      #9 /home/pffco/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2421): DB_common->query("\nSELECT g.id\nFROM civicrm_group g\nWHERE ( g.saved_search_id IS NOT N...")
      #10 /home/pffco/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1613): DB_DataObject->_query("\nSELECT g.id\nFROM civicrm_group g\nWHERE ( g.saved_search_id IS NOT N...")
      #11 /home/pffco/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(155): DB_DataObject->query("\nSELECT g.id\nFROM civicrm_group g\nWHERE ( g.saved_search_id IS NOT N...")
      #12 /home/pffco/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(917): CRM_Core_DAO->query("\nSELECT g.id\nFROM civicrm_group g\nWHERE ( g.saved_search_id IS NOT N...", TRUE)
      #13 /home/pffco/public_html/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/GroupContactCache.php(110): CRM_Core_DAO::executeQuery("\nSELECT g.id\nFROM civicrm_group g\nWHERE ( g.saved_search_id IS NOT N...")
      #14 /home/pffco/public_html/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/GroupContactCache.php(52): CRM_Contact_BAO_GroupContactCache::loadAll((Array:36))
      #15 /home/pffco/public_html/wp-content/plugins/civicrm/civicrm/CRM/Report/Form.php(2526): CRM_Contact_BAO_GroupContactCache::check((Array:36))
      #16 /home/pffco/public_html/wp-content/plugins/civicrm/civicrm/CRM/Report/Form.php(1270): CRM_Report_Form->whereGroupClause((Array:7), (Array:41), "in")
      #17 /home/pffco/public_html/wp-content/plugins/civicrm/civicrm/CRM/Report/Form/Contact/Detail.php(524): CRM_Report_Form->whereClause((Array:7), "in", (Array:41), NULL, NULL)
      #18 /home/pffco/public_html/wp-content/plugins/civicrm/civicrm/CRM/Report/Form.php(1959): CRM_Report_Form_Contact_Detail->where()
      #19 /home/pffco/public_html/wp-content/plugins/civicrm/civicrm/CRM/Report/Form/Contact/Detail.php(714): CRM_Report_Form->buildQuery(TRUE)
      #20 /home/pffco/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(246): CRM_Report_Form_Contact_Detail->postProcess()
      #21 /home/pffco/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Submit.php(73): CRM_Core_Form->mainProcess()
      #22 /home/pffco/public_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Submit->perform(Object(CRM_Report_Form_Contact_Detail), "submit")
      #23 /home/pffco/public_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Report_Form_Contact_Detail), "submit")
      #24 /home/pffco/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(316): HTML_QuickForm_Page->handle("submit")
      #25 /home/pffco/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/Wrapper.php(117): CRM_Core_Controller->run()
      #26 /home/pffco/public_html/wp-content/plugins/civicrm/civicrm/CRM/Report/Page/Report.php(78): CRM_Utils_Wrapper->run("CRM_Report_Form_Contact_Detail", NULL, NULL)
      #27 /home/pffco/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(292): CRM_Report_Page_Report->run((Array:4), NULL)
      #28 /home/pffco/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(70): CRM_Core_Invoke::runItem((Array:14))
      #29 /home/pffco/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:4))
      #30 /home/pffco/public_html/wp-content/plugins/civicrm/civicrm.php(329): CRM_Core_Invoke::invoke((Array:4))
      #31 [internal function](): civicrm_wp_invoke("")
      #32 /home/pffco/public_html/wp-includes/plugin.php(406): call_user_func_array("civicrm_wp_invoke", (Array:1))
      #33 /home/pffco/public_html/wp-admin/admin.php(151): do_action("toplevel_page_CiviCRM")
      #34

      {main}

        Attachments

          Activity

            People

            • Assignee:
              pratik.joshi Pratik Joshi
              Reporter:
              rjm Rob Malerman
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: