Body: <p>When I run an Activity Summary Report I get a 'Count' for each 'Activity Type' by Status.
  <a href="https://i.sstatic.net/HbtW3.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/HbtW3.png" alt="enter image description here" /></a></p>
  <p>My issue is that when I click on that count I get a syntax error report. Should I not be able to see the Activities counted for that activity type???
  <a href="https://i.sstatic.net/Tc4jG.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Tc4jG.png" alt="enter image description here" /></a></p>
  <p>Any suggestions on how I can fix this problem?</p>
  <p>And, I should tell you now that I am not a programmer. We had someone configure our CiviCRM database for us and manage it ourselves as best we can, asking for help as needed.  Plain language and clear direction is appreciated.</p>
  <p>thanks.
  Alison</p>
  <p>EDIT: Here is the output from advice provided in 1st comment:
  Here is the output: race</p>
  <pre><code>#0 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(148): CRM_Core_Error::backtrace()
  #1 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::handle(Object(DB_Error))
  #2 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/packages/DB.php(998): PEAR_Error-&gt;__construct(&quot;DB Error: syntax error&quot;, -2, 16, (Array:2), &quot;CREATE TEMPORARY TABLE `civicrm_tmp_e_dflt_37c5628cae1c143f8da518c925be64d4` ...&quot;)
  #3 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error-&gt;__construct(-2, 16, (Array:2), &quot;CREATE TEMPORARY TABLE `civicrm_tmp_e_dflt_37c5628cae1c143f8da518c925be64d4` ...&quot;)
  #4 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR-&gt;_raiseError(Object(DB_mysqli), NULL, -2, 16, (Array:2), &quot;CREATE TEMPORARY TABLE `civicrm_tmp_e_dflt_37c5628cae1c143f8da518c925be64d4` ...&quot;, &quot;DB_Error&quot;, TRUE)
  #5 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1925): PEAR-&gt;__call(&quot;raiseError&quot;, (Array:7))
  #6 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(935): DB_common-&gt;raiseError(-2, NULL, NULL, &quot;CREATE TEMPORARY TABLE `civicrm_tmp_e_dflt_37c5628cae1c143f8da518c925be64d4` ...&quot;, &quot;1064 ** You have an error in your SQL syntax; check the manual that correspon...&quot;)
  #7 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(405): DB_mysqli-&gt;mysqliRaiseError()
  #8 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1231): DB_mysqli-&gt;simpleQuery(&quot;CREATE TEMPORARY TABLE `civicrm_tmp_e_dflt_37c5628cae1c143f8da518c925be64d4` ...&quot;)
  #9 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2696): DB_common-&gt;query(&quot;CREATE TEMPORARY TABLE `civicrm_tmp_e_dflt_37c5628cae1c143f8da518c925be64d4` ...&quot;)
  #10 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1829): DB_DataObject-&gt;_query(&quot;CREATE TEMPORARY TABLE `civicrm_tmp_e_dflt_37c5628cae1c143f8da518c925be64d4` ...&quot;)
  #11 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(421): DB_DataObject-&gt;query(&quot;CREATE TEMPORARY TABLE `civicrm_tmp_e_dflt_37c5628cae1c143f8da518c925be64d4` ...&quot;)
  #12 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1408): CRM_Core_DAO-&gt;query(&quot;CREATE TEMPORARY TABLE `civicrm_tmp_e_dflt_37c5628cae1c143f8da518c925be64d4` ...&quot;, FALSE)
  #13 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/SQL/TempTable.php(131): CRM_Core_DAO::executeQuery(&quot;CREATE TEMPORARY TABLE `civicrm_tmp_e_dflt_37c5628cae1c143f8da518c925be64d4` ...&quot;, (Array:0), TRUE, NULL, TRUE, FALSE)
  #14 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/CRM/Report/Form.php(1176): CRM_Utils_SQL_TempTable-&gt;createWithQuery(&quot;SELECT civicrm_contact_target.sort_name as civicrm_contact_contact_target, ci...&quot;)
  #15 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/CRM/Report/Form/Activity.php(745): CRM_Report_Form-&gt;createTemporaryTable(&quot;activity_temp_table&quot;, &quot;SELECT civicrm_contact_target.sort_name as civicrm_contact_contact_target, ci...&quot;)
  #16 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/CRM/Report/Form/Activity.php(840): CRM_Report_Form_Activity-&gt;buildQuery(TRUE)
  #17 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/CRM/Report/Form.php(894): CRM_Report_Form_Activity-&gt;postProcess()
  #18 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/CRM/Report/Form/Activity.php(367): CRM_Report_Form-&gt;preProcess()
  #19 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(574): CRM_Report_Form_Activity-&gt;preProcess()
  #20 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Display.php(76): CRM_Core_Form-&gt;buildForm()
  #21 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display-&gt;perform(Object(CRM_Report_Form_Activity), &quot;display&quot;)
  #22 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller-&gt;handle(Object(CRM_Report_Form_Activity), &quot;display&quot;)
  #23 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(335): HTML_QuickForm_Page-&gt;handle(&quot;display&quot;)
  #24 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/Wrapper.php(98): CRM_Core_Controller-&gt;run()
  #25 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/CRM/Report/Page/Instance.php(74): CRM_Utils_Wrapper-&gt;run(&quot;CRM_Report_Form_Activity&quot;, NULL, (Array:0))
  #26 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(311): CRM_Report_Page_Instance-&gt;run((Array:4), NULL)
  #27 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:14))
  #28 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:4))
  #29 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm.php(1449): CRM_Core_Invoke::invoke((Array:4))
  #30 /var/www/vhosts/dartmouthlearning.net/public_html/wp-includes/class-wp-hook.php(287): CiviCRM_For_WordPress-&gt;invoke(&quot;&quot;)
  #31 /var/www/vhosts/dartmouthlearning.net/public_html/wp-includes/class-wp-hook.php(311): WP_Hook-&gt;apply_filters(&quot;&quot;, (Array:1))
  #32 /var/www/vhosts/dartmouthlearning.net/public_html/wp-includes/plugin.php(478): WP_Hook-&gt;do_action((Array:1))
  #33 /var/www/vhosts/dartmouthlearning.net/public_html/wp-admin/admin.php(259): do_action(&quot;toplevel_page_CiviCRM&quot;)
  #34 {main}--  
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-09-16T20:10:32.583Z
Comments.Text: Under administer - system settings - debugging, there's an option to "Display Backtrace". Set that to yes, then trigger the error again. Then if you can edit your question and paste in the output. Then turn off that setting again if it's a live site.
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-09-17T17:02:40.270Z
Comments.Text: Here is the output:
Comments.UserDisplayName: Alison
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-09-17T17:37:10.897Z
Comments.Text: Unfortunately it seems to have cut off the important part, but based on the line numbers it looks like maybe the code file CRM/Report/Form/Activity.php has been edited slightly  by someone(?) so that might be what's causing the error. So either: If you can install the [Log viewer extension](https://civicrm.org/extensions/civicrm-log-viewer) it might show the full error, or if you have access to the files on the server there should be a file in wp-content/uploads/civicrm/ConfigAndLog. Or, make a back up copy of the file CRM/Report/Form/Activity.php and then replace with the original file.
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-09-17T19:18:22.773Z
Comments.Text: Okay.  thanks Demerit.  Much appreciated.  I can't see how that would have happened as we don't touch the code but we will look into it.
Comments.UserDisplayName: Alison
Tags: <civireport><activity>
Title: Problem with civiReport/Activity Summary
ThreadText: # Problem with civiReport/Activity Summary
  
  (Asked by: username_0 on 2020-09-16)
  
  When I run an Activity Summary Report I get a 'Count' for each 'Activity Type' by Status.
  
  My issue is that when I click on that count I get a syntax error report. Should I not be able to see the Activities counted for that activity type???
  
  Any suggestions on how I can fix this problem?
  And, I should tell you now that I am not a programmer. We had someone configure our CiviCRM database for us and manage it ourselves as best we can, asking for help as needed.  Plain language and clear direction is appreciated.
  thanks.
  username_0
  EDIT: Here is the output from advice provided in 1st comment:
  Here is the output: race
  #0 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(148): CRM_Core_Error::backtrace()
  #1 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::handle(Object(DB_Error))
  #2 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/packages/DB.php(998): PEAR_Error->__construct("DB Error: syntax error", -2, 16, (Array:2), "CREATE TEMPORARY TABLE `civicrm_tmp_e_dflt_37c5628cae1c143f8da518c925be64d4` ...")
  #3 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error->__construct(-2, 16, (Array:2), "CREATE TEMPORARY TABLE `civicrm_tmp_e_dflt_37c5628cae1c143f8da518c925be64d4` ...")
  #4 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -2, 16, (Array:2), "CREATE TEMPORARY TABLE `civicrm_tmp_e_dflt_37c5628cae1c143f8da518c925be64d4` ...", "DB_Error", TRUE)
  #5 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1925): PEAR->__call("raiseError", (Array:7))
  #6 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(935): DB_common->raiseError(-2, NULL, NULL, "CREATE TEMPORARY TABLE `civicrm_tmp_e_dflt_37c5628cae1c143f8da518c925be64d4` ...", "1064 ** You have an error in your SQL syntax; check the manual that correspon...")
  #7 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(405): DB_mysqli->mysqliRaiseError()
  #8 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1231): DB_mysqli->simpleQuery("CREATE TEMPORARY TABLE `civicrm_tmp_e_dflt_37c5628cae1c143f8da518c925be64d4` ...")
  #9 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2696): DB_common->query("CREATE TEMPORARY TABLE `civicrm_tmp_e_dflt_37c5628cae1c143f8da518c925be64d4` ...")
  #10 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1829): DB_DataObject->_query("CREATE TEMPORARY TABLE `civicrm_tmp_e_dflt_37c5628cae1c143f8da518c925be64d4` ...")
  #11 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(421): DB_DataObject->query("CREATE TEMPORARY TABLE `civicrm_tmp_e_dflt_37c5628cae1c143f8da518c925be64d4` ...")
  #12 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1408): CRM_Core_DAO->query("CREATE TEMPORARY TABLE `civicrm_tmp_e_dflt_37c5628cae1c143f8da518c925be64d4` ...", FALSE)
  #13 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/SQL/TempTable.php(131): CRM_Core_DAO::executeQuery("CREATE TEMPORARY TABLE `civicrm_tmp_e_dflt_37c5628cae1c143f8da518c925be64d4` ...", (Array:0), TRUE, NULL, TRUE, FALSE)
  #14 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/CRM/Report/Form.php(1176): CRM_Utils_SQL_TempTable->createWithQuery("SELECT civicrm_contact_target.sort_name as civicrm_contact_contact_target, ci...")
  #15 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/CRM/Report/Form/Activity.php(745): CRM_Report_Form->createTemporaryTable("activity_temp_table", "SELECT civicrm_contact_target.sort_name as civicrm_contact_contact_target, ci...")
  #16 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/CRM/Report/Form/Activity.php(840): CRM_Report_Form_Activity->buildQuery(TRUE)
  #17 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/CRM/Report/Form.php(894): CRM_Report_Form_Activity->postProcess()
  #18 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/CRM/Report/Form/Activity.php(367): CRM_Report_Form->preProcess()
  #19 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(574): CRM_Report_Form_Activity->preProcess()
  #20 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Display.php(76): CRM_Core_Form->buildForm()
  #21 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Report_Form_Activity), "display")
  #22 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Report_Form_Activity), "display")
  #23 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(335): HTML_QuickForm_Page->handle("display")
  #24 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/Wrapper.php(98): CRM_Core_Controller->run()
  #25 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/CRM/Report/Page/Instance.php(74): CRM_Utils_Wrapper->run("CRM_Report_Form_Activity", NULL, (Array:0))
  #26 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(311): CRM_Report_Page_Instance->run((Array:4), NULL)
  #27 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(68): CRM_Core_Invoke::runItem((Array:14))
  #28 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:4))
  #29 /var/www/vhosts/dartmouthlearning.net/public_html/wp-content/plugins/civicrm/civicrm.php(1449): CRM_Core_Invoke::invoke((Array:4))
  #30 /var/www/vhosts/dartmouthlearning.net/public_html/wp-includes/class-wp-hook.php(287): CiviCRM_For_WordPress->invoke("")
  #31 /var/www/vhosts/dartmouthlearning.net/public_html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters("", (Array:1))
  #32 /var/www/vhosts/dartmouthlearning.net/public_html/wp-includes/plugin.php(478): WP_Hook->do_action((Array:1))
  #33 /var/www/vhosts/dartmouthlearning.net/public_html/wp-admin/admin.php(259): do_action("toplevel_page_CiviCRM")
  #34 {main}--
  
  **Tags:** civireport, activity
  
  > **Comments:**
  > **username_1**: Under administer - system settings - debugging, there's an option to "Display Backtrace". Set that to yes, then trigger the error again. Then if you can edit your question and paste in the output. Then turn off that setting again if it's a live site.  
  > **username_0**: Here is the output:  
  > **username_1**: Unfortunately it seems to have cut off the important part, but based on the line numbers it looks like maybe the code file CRM/Report/Form/Activity.php has been edited slightly  by someone(?) so that might be what's causing the error. So either: If you can install the [Log viewer extension](https://civicrm.org/extensions/civicrm-log-viewer) it might show the full error, or if you have access to the files on the server there should be a file in wp-content/uploads/civicrm/ConfigAndLog. Or, make a back up copy of the file CRM/Report/Form/Activity.php and then replace with the original file.  
  > **username_0**: Okay.  thanks username_1.  Much appreciated.  I can't see how that would have happened as we don't touch the code but we will look into it.  
  
  ---
  
  ## 0 answers
  
  