Answers.Body: <p>Based on additional tests and comments from Demerit, it appears that the report requires the case manager to be assigned to the case to list the case. </p>
  
  <p>The obvious workaround is to assign a case coordinator to a case and then everything seems to work.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-17T09:23:09.063Z
Answers.LastActivityDate: 2019-05-17T09:23:09.063Z
Answers.UserDisplayName: Marian Zastawny
Answers.Body: <p>Without seeing the filters tab, my guess is one of two things:</p>
  
  <p>1) A popup is appearing at the top right, like this</p>
  
  <p><a href="https://i.sstatic.net/9M62j.gif" rel="nofollow noreferrer"><img src="https://i.sstatic.net/9M62j.gif" alt="enter image description here"></a></p>
  
  <p>and maybe it's not clear what it's saying, but it's an error saying that if you have Staff Member and Relationship checked you need to select a relationship type on the Filters tab.</p>
  
  <p>2) That theme is maybe shoreditch? It looks different from the standard so maybe something is going on there. If the problem isn't #1 above, then if you switch to the standard theme does it work?</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-13T19:47:13.940Z
Answers.Text: 1) I get this one, but the list is still empty even if I deselect both fields
Answers.UserDisplayName: Marian Zastawny
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-13T20:03:56.720Z
Answers.Text: 2) I am using CiviCRM Admin Utilities for Wordpress, but the problem persists even if the plugin is disabled
Answers.UserDisplayName: Marian Zastawny
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-13T04:10:39.220Z
Answers.LastActivityDate: 2019-05-13T04:10:39.220Z
Answers.UserDisplayName: Demerit
Body: <p>I have set up report to list the number of active cases, however the report doesn't show anything when I refresh results, even though there is a number of opened cases which show in the Case dashboard. </p>
  
  <p>Any idea why this might be not working?</p>
  
  <p>I am running version 5.13.1 on Wordpress</p>
  
  <p><a href="https://i.sstatic.net/3niwV.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/3niwV.png" alt="CiviCase report settings"></a></p>
  
  <hr>
  
  <p>I added the code for the report (Developer Tab)</p>
  
  <pre><code>Class used: CRM_Report_Form_Case_Summary
  
  SQL Modes: NO_AUTO_CREATE_USER NO_ENGINE_SUBSTITUTION
  
  SELECT SQL_CALC_FOUND_ROWS c2_civireport.sort_name as civicrm_c2_client_name, c2_civireport.id as civicrm_c2_id, case_civireport.id as civicrm_case_id, case_civireport.subject as civicrm_case_subject, case_civireport.status_id as civicrm_case_status_id, case_civireport.start_date as civicrm_case_start_date, case_civireport.end_date as civicrm_case_end_date, IF(case_civireport.end_date Is Null, '', DATEDIFF(case_civireport.end_date, case_civireport.start_date)) as civicrm_case_duration  
  
  
  FROM civicrm_contact contact_civireport
  inner join civicrm_relationship relationship_civireport on contact_civireport.id = relationship_civireport.contact_id_b
  inner join civicrm_case case_civireport on case_civireport.id = relationship_civireport.case_id
  inner join civicrm_relationship_type relationship_type_civireport on relationship_type_civireport.id=relationship_civireport.relationship_type_id
  inner join civicrm_case_contact case_contact_civireport on case_contact_civireport.case_id = case_civireport.id
  inner join civicrm_contact c2_civireport on c2_civireport.id=case_contact_civireport.contact_id
  
  
  WHERE case_civireport.case_type_id  REGEXP '[[:cntrl:]]*3[[:cntrl:]]*' AND ( case_civireport.status_id IN (1, 3) ) AND ( case_civireport.is_deleted = 0 )   
  
  ORDER BY case_civireport.start_date ASC  
  
  LIMIT 0, 50
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-12T00:05:59.113Z
Comments.Text: Can you edit the question to include a screenshot of which report and what the filters are?
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-12T23:02:25.867Z
Comments.Text: I've added the case summary report settings which I am trying to use - are are set to defaults and no filters are applied
Comments.UserDisplayName: Marian Zastawny
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-13T04:11:50.510Z
Comments.Text: Thanks - have added a possible answer.
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-13T04:52:28.327Z
Comments.Text: Looking at number of tabs available to your user, it might be Contact Access/ permission issue.
Comments.UserDisplayName: Sunil Pawar
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-13T15:13:07.827Z
Comments.Text: @SunilPawar I'm not sure it's permissions because that's what the tabs look like when you first create a new report from a template before you've saved it as an instance. Also he says the dashboard shows the cases.
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-13T19:46:30.910Z
Comments.Text: So this is definitely not a permission problem as I am the database administrator and I should be able to see the permissions. The only other thing worth adding is that I changed the domain address for the website. I updated all the details (so I hope) and other features seem to be working without big problems.
Comments.UserDisplayName: Marian Zastawny
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-13T19:51:41.423Z
Comments.Text: The SQL you added suggests you are filtering on case type. Is it maybe a disabled type or something like that?
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-13T19:54:18.533Z
Comments.Text: Nope, I have the same problem even if I disable all filters. I can also see these cases without any problem in my CiviCase Dashboard
Comments.UserDisplayName: Marian Zastawny
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-13T20:14:05.530Z
Comments.Text: If you run that query in mysql directly, via phpmyadmin or some other way, does it return any data?
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-13T22:26:57.900Z
Comments.Text: I get the following message when I execute the query in phpmyadmin: MySQL returned an empty result set (i.e. zero rows).
Comments.UserDisplayName: Marian Zastawny
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-13T23:22:46.167Z
Comments.Text: How are the roles and relationship types configured in your system? On a manage case screen for example do you see anything in the Roles section? And for your case type definitions do you have roles defined?
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-14T20:03:27.163Z
Comments.Text: Interesting... I can only see the cases which have case coordinator assigned. Is this expected behaviour?
Comments.UserDisplayName: Marian Zastawny
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-15T19:09:47.867Z
Comments.Text: This report seems to depend on there being at least one role on the case.
Comments.UserDisplayName: Demerit
Tags: <wordpress><civireport><civicase>
Title: Civicase report shows empty list
ThreadText: # Civicase report shows empty list
  
  (Asked by: username_0 on 2019-05-11)
  
  I have set up report to list the number of active cases, however the report doesn't show anything when I refresh results, even though there is a number of opened cases which show in the Case dashboard.
  
  Any idea why this might be not working?
  
  I am running version 5.13.1 on Wordpress
  
  [![CiviCase report settings](https://i.sstatic.net/3niwV.png)](https://i.sstatic.net/3niwV.png)
  
  ---
  
  I added the code for the report (Developer Tab)
  
  ```
  Class used: CRM_Report_Form_Case_Summary
  
  SQL Modes: NO_AUTO_CREATE_USER NO_ENGINE_SUBSTITUTION
  
  SELECT SQL_CALC_FOUND_ROWS c2_civireport.sort_name as civicrm_c2_client_name, c2_civireport.id as civicrm_c2_id, case_civireport.id as civicrm_case_id, case_civireport.subject as civicrm_case_subject, case_civireport.status_id as civicrm_case_status_id, case_civireport.start_date as civicrm_case_start_date, case_civireport.end_date as civicrm_case_end_date, IF(case_civireport.end_date Is Null, '', DATEDIFF(case_civireport.end_date, case_civireport.start_date)) as civicrm_case_duration  
  
  FROM civicrm_contact contact_civireport
  inner join civicrm_relationship relationship_civireport on contact_civireport.id = relationship_civireport.contact_id_b
  inner join civicrm_case case_civireport on case_civireport.id = relationship_civireport.case_id
  inner join civicrm_relationship_type relationship_type_civireport on relationship_type_civireport.id=relationship_civireport.relationship_type_id
  inner join civicrm_case_contact case_contact_civireport on case_contact_civireport.case_id = case_civireport.id
  inner join civicrm_contact c2_civireport on c2_civireport.id=case_contact_civireport.contact_id
  
  WHERE case_civireport.case_type_id  REGEXP '[[:cntrl:]]*3[[:cntrl:]]*' AND ( case_civireport.status_id IN (1, 3) ) AND ( case_civireport.is_deleted = 0 )   
  
  ORDER BY case_civireport.start_date ASC  
  
  LIMIT 0, 50
  
  ```
  
  **Tags:** wordpress, civireport, civicase
  
  > **Comments:**
  > **username_1**: Can you edit the question to include a screenshot of which report and what the filters are?  
  > **username_0**: I've added the case summary report settings which I am trying to use - are are set to defaults and no filters are applied  
  > **username_1**: Thanks - have added a possible answer.  
  > **username_2**: Looking at number of tabs available to your user, it might be Contact Access/ permission issue.  
  > **username_1**: @username_2 I'm not sure it's permissions because that's what the tabs look like when you first create a new report from a template before you've saved it as an instance. Also he says the dashboard shows the cases.  
  > **username_0**: So this is definitely not a permission problem as I am the database administrator and I should be able to see the permissions. The only other thing worth adding is that I changed the domain address for the website. I updated all the details (so I hope) and other features seem to be working without big problems.  
  > **username_1**: The SQL you added suggests you are filtering on case type. Is it maybe a disabled type or something like that?  
  > **username_0**: Nope, I have the same problem even if I disable all filters. I can also see these cases without any problem in my CiviCase Dashboard  
  > **username_1**: If you run that query in mysql directly, via phpmyadmin or some other way, does it return any data?  
  > **username_0**: I get the following message when I execute the query in phpmyadmin: MySQL returned an empty result set (i.e. zero rows).  
  > **username_1**: How are the roles and relationship types configured in your system? On a manage case screen for example do you see anything in the Roles section? And for your case type definitions do you have roles defined?  
  > **username_0**: Interesting... I can only see the cases which have case coordinator assigned. Is this expected behaviour?  
  > **username_1**: This report seems to depend on there being at least one role on the case.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2019-05-17. Score: 2 | Accepted answer
  
  Based on additional tests and comments from username_1, it appears that the report requires the case manager to be assigned to the case to list the case.
  
  The obvious workaround is to assign a case coordinator to a case and then everything seems to work.
  
  
  ---
  
  ### Answer by username_1 on 2019-05-13. Score: 0
  
  Without seeing the filters tab, my guess is one of two things:
  
  1) A popup is appearing at the top right, like this
  
  [![enter image description here](https://i.sstatic.net/9M62j.gif)](https://i.sstatic.net/9M62j.gif)
  
  and maybe it's not clear what it's saying, but it's an error saying that if you have Staff Member and Relationship checked you need to select a relationship type on the Filters tab.
  
  2) That theme is maybe shoreditch? It looks different from the standard so maybe something is going on there. If the problem isn't #1 above, then if you switch to the standard theme does it work?
  
  > **Comments:**
  > **username_0**: 1) I get this one, but the list is still empty even if I deselect both fields  
  > **username_0**: 2) I am using CiviCRM Admin Utilities for Wordpress, but the problem persists even if the plugin is disabled  
  
  ---
  
  