Answers.Body: <p>As per comments it sounds like the report is set to Add To My Reports on the access tab (making it private to the owner).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-27T08:29:25.513Z
Answers.Text: Thanks for your help with this, much appreciated
Answers.UserDisplayName: Andy Clark
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-23T20:54:25.730Z
Answers.LastActivityDate: 2021-03-25T22:14:24.907Z
Answers.LastEditDate: 2021-03-25T22:14:24.907Z
Answers.UserDisplayName: Demerit
Body: <p>A user has reported that doing an 'Export to CSV' from a case report works OK when she does it, but doesn't work for a user 'B' - even though user 'B' has the correct access (we're using ACLs).  Masquerading as user 'B' not only does export to CSV not work, but user 'B' doesn't get access to the report criteria.  This is on 5.28.3 but I have a test system at 5.35.1. and it's the same. Other non-case reports work as expected for user 'B'
  <br> If I create a case report when masquerading as user 'B' then the report works OK and export to CSV works too.  If I then masquerade as user 'C' and access the report that user 'B' created I don't get the report filter and cannot export to CSV.
  <br>
  I can't reproduce this when not using ACLs and also not on the demo site as it's not possible to add users.  Is this a known limitation of case reports or a bug? Or am I missing something else?  I'm surprised there's no discussion on here about this.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-03-24T13:20:43.130Z
Comments.Text: I tried reproducing this and couldn't - I can use export to csv on a case report created by another user and using acls. Could you give a little more info about your acl setup? Also which case report?
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-03-24T14:16:52.703Z
Comments.Text: It was the 'Case Detail Report' template.  I made the user an administrator, but they still didn't see the report criteria and couldn't export to CSV.  In general the ACLs restrict users to some custom field sets, although this user wasn't restricted either to custom field sets or to groups of users.  The report uses some custom fields added to a case type.
Comments.UserDisplayName: Andy Clark
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-03-25T21:51:27.930Z
Comments.Text: Sorry I still can't reproduce. I'm not sure what would be causing this other than maybe it's set as a private report? Otherwise I can't think of what to check other than to start debugging the code.
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-03-25T22:02:02.887Z
Comments.Text: Set as a private report? I wasn't aware of that - how is that done? Or do you mean a reserved report?
Comments.UserDisplayName: Andy Clark
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-03-25T22:10:49.577Z
Comments.Text: In the 'Access' tab it was checked as 'Add to My Reports' so I unchecked that.  Now when I masquerade as the user it appears to work OK! - with tabs and can export to csv.  I'll ask the user tomorrow if works for her.  Is this 'working as designed' or what? I;ve not run into this before.
Comments.UserDisplayName: Andy Clark
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-03-25T22:13:18.027Z
Comments.Text: Yep that's what I meant. The function internally that checks is called reportIsPrivate().
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-03-25T22:27:14.243Z
Comments.Text: I see what you mean though about how this might be confusing if you have a sitewide menu entry linking to it. It really just hides it from the report listing page. I'm not sure what the original use-case/spec was for the feature or if it got a little borked.
Comments.UserDisplayName: Demerit
Tags: <civireport><civicase>
Title: Case reports only work properly for originating user - bug or as designed (or both)?
ThreadText: # Case reports only work properly for originating user - bug or as designed (or both)?
  
  (Asked by: username_0 on 2021-03-23)
  
  A user has reported that doing an 'Export to CSV' from a case report works OK when she does it, but doesn't work for a user 'B' - even though user 'B' has the correct access (we're using ACLs). Masquerading as user 'B' not only does export to CSV not work, but user 'B' doesn't get access to the report criteria. This is on 5.28.3 but I have a test system at 5.35.1. and it's the same. Other non-case reports work as expected for user 'B'
    
   If I create a case report when masquerading as user 'B' then the report works OK and export to CSV works too. If I then masquerade as user 'C' and access the report that user 'B' created I don't get the report filter and cannot export to CSV.
    
  I can't reproduce this when not using ACLs and also not on the demo site as it's not possible to add users. Is this a known limitation of case reports or a bug? Or am I missing something else? I'm surprised there's no discussion on here about this.
  
  **Tags:** civireport, civicase
  
  > **Comments:**
  > **username_1**: I tried reproducing this and couldn't - I can use export to csv on a case report created by another user and using acls. Could you give a little more info about your acl setup? Also which case report?  
  > **username_0**: It was the 'Case Detail Report' template.  I made the user an administrator, but they still didn't see the report criteria and couldn't export to CSV.  In general the ACLs restrict users to some custom field sets, although this user wasn't restricted either to custom field sets or to groups of users.  The report uses some custom fields added to a case type.  
  > **username_1**: Sorry I still can't reproduce. I'm not sure what would be causing this other than maybe it's set as a private report? Otherwise I can't think of what to check other than to start debugging the code.  
  > **username_0**: Set as a private report? I wasn't aware of that - how is that done? Or do you mean a reserved report?  
  > **username_0**: In the 'Access' tab it was checked as 'Add to My Reports' so I unchecked that.  Now when I masquerade as the user it appears to work OK! - with tabs and can export to csv.  I'll ask the user tomorrow if works for her.  Is this 'working as designed' or what? I;ve not run into this before.  
  > **username_1**: Yep that's what I meant. The function internally that checks is called reportIsPrivate().  
  > **username_1**: I see what you mean though about how this might be confusing if you have a sitewide menu entry linking to it. It really just hides it from the report listing page. I'm not sure what the original use-case/spec was for the feature or if it got a little borked.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-03-23. Score: 1 | Accepted answer
  
  As per comments it sounds like the report is set to Add To My Reports on the access tab (making it private to the owner).
  
  > **Comments:**
  > **username_0**: Thanks for your help with this, much appreciated  
  
  ---
  
  