+ Start a Discussion
Katherine RoweKatherine Rowe 

Query to find all personal reports based on user's role

I understand we can now use Developer Console to find and delete reports from the users' personal report folders. I need help writing that query. At least to view the reports, and then later to delete.

I want it to show me report id, report name, user name, user role for all users where role contains "abc". And then I would like to do the same query, but for users that are inactive instead of based on their role.

The example floating around in the documentation is below, but not sure how to incorporate the changes I want:
 
SELECT Id FROM Report USING SCOPE allPrivate WHERE LastRunDate < LAST_N_DAYS:365