How to query(SOQL) to fetch Reports in Salesforce?

How to query(SOQL) to fetch Reports in Salesforce?

Sample SOQL:
SELECT Name, Format, LastRunDate, LastViewedDate, LastModifiedDate, CreatedDate FROM Report
 
Output:
 

SOQL to find reports that last ran last year:
SELECT Name, Format, LastRunDate, LastViewedDate, LastModifiedDate, CreatedDate
FROM Report
WHERE LastRunDate = LAST_YEAR

Leave a Reply