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 with template for Case Details Report
Pages: [1]

Author Topic: Error with template for Case Details Report  (Read 1317 times)

ajjumba

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
  • CiviCRM version: 4.0.3
  • CMS version: Drupal 7.2
  • MySQL version: 5.1.52
  • PHP version: 5.2.4
Error with template for Case Details Report
April 06, 2011, 02:22:28 pm
I am trying to Create a Report from a Template using the Case Details Report. Everything works well when I do not set any filters. However, when I set filters (for example, Case Type and Case Status) I am able to create the report but when I go to view the newly created report I get an error.
The error is “Sorry. A non-recoverable error has occurred. DB Error: syntax error”. Does anybody have any ideas on what may be going on, or what I am doing wrong?
Thanks.

The Error Details are:

Database Error Code: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ...
« Last Edit: April 06, 2011, 03:01:44 pm by ajjumba »

Rajan Mayekar

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 20
    • Rajan's Blogs
Re: Error with template for Case Details Report
April 07, 2011, 03:52:31 am
This has been fixed for CiviCRM 3.4.alpha.
U can apply the patch for ur current installation: https://fisheye2.atlassian.com/viewrep/CiviCRM/trunk/CRM/Report/Form/Case/Detail.php?r1=32994&r2=33348.

Rajan

Rajan Mayekar

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 20
    • Rajan's Blogs
Re: Error with template for Case Details Report
April 07, 2011, 04:16:18 am
Just got an bug while checking this :)
After applying above patch u need to use this
Code: [Select]
Index: CRM/Report/Form/Case/Detail.php
===================================================================
--- CRM/Report/Form/Case/Detail.php (revision 33562)
+++ CRM/Report/Form/Case/Detail.php (working copy)
@@ -460,7 +460,7 @@
                 }
             }
             if ( array_key_exists('civicrm_case_case_type_id', $row ) ) {
-                if ( $value = str_replace( CRM_Case_BAO_Case::VALUE_SEPERATOR, '', $row['civicrm_case_case_type_id'] )) {
+                if ( $value = str_replace( CRM_Core_DAO::VALUE_SEPARATOR, '', $row['civicrm_case_case_type_id'] )) {
                     $rows[$rowNum]['civicrm_case_case_type_id'] = $this->case_types[$value];
                     
                     $entryFound = true;

Thanks,
Rajan

ajjumba

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
  • CiviCRM version: 4.0.3
  • CMS version: Drupal 7.2
  • MySQL version: 5.1.52
  • PHP version: 5.2.4
Re: Error with template for Case Details Report
April 07, 2011, 10:53:09 am
Awesome. Thank you.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviReport (Moderator: Dave Greenberg) »
  • Error with template for Case Details Report

This forum was archived on 2017-11-26.