Answers.Body: <p>By &quot;report&quot; I assume you mean a CiviReport? It sounds like you used to have a custom field when the report was created and then the custom field was deleted. You can try recreating/resaving the report.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-08-12T13:48:29.883Z
Answers.LastActivityDate: 2020-08-12T13:48:29.883Z
Answers.UserDisplayName: Demerit
Body: <p>I am getting errors about a missing case relationship to reports:</p>
  <p>[error] $Fatal Error Details = Array
  (
  [callback] =&gt; Array
  (
  [0] =&gt; CRM_Core_Error
  [1] =&gt; exceptionHandler
  )</p>
  <pre><code>[code] =&gt; -19
  [message] =&gt; DB Error: no such field
  [mode] =&gt; 16
  [debug_info] =&gt; SELECT a.id as `id`, a.name_a_b as `name_a_b`, a.label_a_b as `label_a_b`, a.name_b_a as `name_b_a`, a.label_b_a as `label_b_a`, a.description as `description`, a.contact_type_a as `contact_type_a`, a.contact_type_b as `contact_type_b`, a.contact_sub_type_a as `contact_sub_type_a`, a.contact_sub_type_b as `contact_sub_type_b`, a.is_reserved as `is_reserved`, a.is_active as `is_active`, a_to_civicrm_value_relationship__37.display_block_on_contact_summary as `custom_157`
  </code></pre>
  <p>FROM civicrm_relationship_type a
  LEFT JOIN <code>civicrm_value_relationship__37</code> <code>a_to_civicrm_value_relationship__37</code> ON <code>a_to_civicrm_value_relationship__37</code>.entity_id = <code>a</code>.id
  [nativecode=1054 ** Unknown column 'a_to_civicrm_value_relationship__37.display_block_on_contact_summary' in 'field list']
  [type] =&gt; DB_Error
  [user_info] =&gt; SELECT a.id as <code>id</code>, a.name_a_b as <code>name_a_b</code>, a.label_a_b as <code>label_a_b</code>, a.name_b_a as <code>name_b_a</code>, a.label_b_a as <code>label_b_a</code>, a.description as <code>description</code>, a.contact_type_a as <code>contact_type_a</code>, a.contact_type_b as <code>contact_type_b</code>, a.contact_sub_type_a as <code>contact_sub_type_a</code>, a.contact_sub_type_b as <code>contact_sub_type_b</code>, a.is_reserved as <code>is_reserved</code>, a.is_active as <code>is_active</code>, a_to_civicrm_value_relationship__37.display_block_on_contact_summary as <code>custom_157</code>
  FROM civicrm_relationship_type a
  LEFT JOIN <code>civicrm_value_relationship__37</code> <code>a_to_civicrm_value_relationship__37</code> ON <code>a_to_civicrm_value_relationship__37</code>.entity_id = <code>a</code>.id
  [nativecode=1054 ** Unknown column 'a_to_civicrm_value_relationship__37.display_block_on_contact_summary' in 'field list']
  [to_string] =&gt; [db_error: message=&quot;DB Error: no such field&quot; code=-19 mode=callback callback=CRM_Core_Error::exceptionHandler prefix=&quot;&quot; info=&quot;SELECT a.id as <code>id</code>, a.name_a_b as <code>name_a_b</code>, a.label_a_b as <code>label_a_b</code>, a.name_b_a as <code>name_b_a</code>, a.label_b_a as <code>label_b_a</code>, a.description as <code>description</code>, a.contact_type_a as <code>contact_type_a</code>, a.contact_type_b as <code>contact_type_b</code>, a.contact_sub_type_a as <code>contact_sub_type_a</code>, a.contact_sub_type_b as <code>contact_sub_type_b</code>, a.is_reserved as <code>is_reserved</code>, a.is_active as <code>is_active</code>, a_to_civicrm_value_relationship__37.display_block_on_contact_summary as <code>custom_157</code>
  FROM civicrm_relationship_type a
  LEFT JOIN <code>civicrm_value_relationship__37</code> <code>a_to_civicrm_value_relationship__37</code> ON <code>a_to_civicrm_value_relationship__37</code>.entity_id = <code>a</code>.id
  [nativecode=1054 ** Unknown column 'a_to_civicrm_value_relationship__37.display_block_on_contact_summary' in 'field list']&quot;]
  )</p>
  
Tags: <civicase>
Title: civiCase missing relationships to reports and new system category
ThreadText: # civiCase missing relationships to reports and new system category
  
  (Asked by: username_0 on 2020-08-12)
  
  I am getting errors about a missing case relationship to reports:
  
  [error] $Fatal Error Details = Array
  (
  [callback] => Array
  (
  [0] => CRM\_Core\_Error
  [1] => exceptionHandler
  )
  
  ```
  [code] => -19
  [message] => DB Error: no such field
  [mode] => 16
  [debug_info] => SELECT a.id as `id`, a.name_a_b as `name_a_b`, a.label_a_b as `label_a_b`, a.name_b_a as `name_b_a`, a.label_b_a as `label_b_a`, a.description as `description`, a.contact_type_a as `contact_type_a`, a.contact_type_b as `contact_type_b`, a.contact_sub_type_a as `contact_sub_type_a`, a.contact_sub_type_b as `contact_sub_type_b`, a.is_reserved as `is_reserved`, a.is_active as `is_active`, a_to_civicrm_value_relationship__37.display_block_on_contact_summary as `custom_157`
  
  ```
  
  FROM civicrm\_relationship\_type a
  LEFT JOIN `civicrm_value_relationship__37` `a_to_civicrm_value_relationship__37` ON `a_to_civicrm_value_relationship__37`.entity\_id = `a`.id
  [nativecode=1054 \*\* Unknown column 'a\_to\_civicrm\_value\_relationship\_\_37.display\_block\_on\_contact\_summary' in 'field list']
  [type] => DB\_Error
  [user\_info] => SELECT a.id as `id`, a.name\_a\_b as `name_a_b`, a.label\_a\_b as `label_a_b`, a.name\_b\_a as `name_b_a`, a.label\_b\_a as `label_b_a`, a.description as `description`, a.contact\_type\_a as `contact_type_a`, a.contact\_type\_b as `contact_type_b`, a.contact\_sub\_type\_a as `contact_sub_type_a`, a.contact\_sub\_type\_b as `contact_sub_type_b`, a.is\_reserved as `is_reserved`, a.is\_active as `is_active`, a\_to\_civicrm\_value\_relationship\_\_37.display\_block\_on\_contact\_summary as `custom_157`
  FROM civicrm\_relationship\_type a
  LEFT JOIN `civicrm_value_relationship__37` `a_to_civicrm_value_relationship__37` ON `a_to_civicrm_value_relationship__37`.entity\_id = `a`.id
  [nativecode=1054 \*\* Unknown column 'a\_to\_civicrm\_value\_relationship\_\_37.display\_block\_on\_contact\_summary' in 'field list']
  [to\_string] => [db\_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM\_Core\_Error::exceptionHandler prefix="" info="SELECT a.id as `id`, a.name\_a\_b as `name_a_b`, a.label\_a\_b as `label_a_b`, a.name\_b\_a as `name_b_a`, a.label\_b\_a as `label_b_a`, a.description as `description`, a.contact\_type\_a as `contact_type_a`, a.contact\_type\_b as `contact_type_b`, a.contact\_sub\_type\_a as `contact_sub_type_a`, a.contact\_sub\_type\_b as `contact_sub_type_b`, a.is\_reserved as `is_reserved`, a.is\_active as `is_active`, a\_to\_civicrm\_value\_relationship\_\_37.display\_block\_on\_contact\_summary as `custom_157`
  FROM civicrm\_relationship\_type a
  LEFT JOIN `civicrm_value_relationship__37` `a_to_civicrm_value_relationship__37` ON `a_to_civicrm_value_relationship__37`.entity\_id = `a`.id
  [nativecode=1054 \*\* Unknown column 'a\_to\_civicrm\_value\_relationship\_\_37.display\_block\_on\_contact\_summary' in 'field list']"]
  )
  
  **Tags:** civicase
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-08-12. Score: 0
  
  By "report" I assume you mean a CiviReport? It sounds like you used to have a custom field when the report was created and then the custom field was deleted. You can try recreating/resaving the report.
  
  
  ---
  
  