function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Iago SilvaIago Silva 

Show report in community page

I'm trying to show a report in a community page, as an Admin I can see the report but when I log into the community as a user with Customer Community license I'm presented the following error:

Error communitySomeone can help me?
Thanks in advance ;)
Best Answer chosen by Iago Silva
ANUTEJANUTEJ (Salesforce Developers) 
>> https://salesforce.stackexchange.com/questions/99081/soql-list-reports-current-user-can-access

As mentioned in the above link can you try checking using a soql query if the community user has access to that particular report.

SOQL Query: 
SELECT RecordId, HasReadAccess FROM UserRecordAccess WHERE UserId = '00524000001O6ME' AND RecordId = '00O24000004DCbL'

All Answers

ANUTEJANUTEJ (Salesforce Developers) 
Hi Iago,

>> https://help.salesforce.com/articleView?id=networks_enable_report_options.htm&type=5

Can you try checking if you follow the steps mentioned in the above article if it works?

Steps:
1> From Setup, enter Communities Settings in the Quick Find box, then select Communities Settings.
2> Select Enable report options for external users.
3> Click Save.

Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.  

Thanks.
Iago SilvaIago Silva
Yes, this option was already enabled.
ANUTEJANUTEJ (Salesforce Developers) 
>> https://salesforce.stackexchange.com/questions/99081/soql-list-reports-current-user-can-access

As mentioned in the above link can you try checking using a soql query if the community user has access to that particular report.

SOQL Query: 
SELECT RecordId, HasReadAccess FROM UserRecordAccess WHERE UserId = '00524000001O6ME' AND RecordId = '00O24000004DCbL'
This was selected as the best answer
Iago SilvaIago Silva
Thanks for the response, but actually the license used in this case didn't allow community users to see reports. 
dev5000000dev5000000
What license ended up working for you? Im currently having issues with a Customer Community Plus user not able to view reports. Even though this article (https://help.salesforce.com/s/articleView?id=sf.users_license_types_communities.htm&type=5) says "Customer Community Plus - Business-to-consumer experiences with external users who need access to reports and dashboards and need standard sharing. The Customer Community Plus can be used with person accounts."
Iago SilvaIago Silva
Hi dev5000000,

My client gave up using reports because he didn't want to buy the customer community plus license.
Maybe you can follow these steps:

- Certify that the user/profile has access to the objects referenced in the report
- Certify that the user/profile has the "Run reports" permission enabled

- There are other permissions that can help like "Report Builder"