6

I have 300 reports in my organization, and i want to see reports for sobject say xyz__c.

I tried to retrieve it using soql but there is no relationship between sObject and Report.

Any pointers/suggestions would greatly appreciated.

1
  • sObject should have the __c naming convention, that would be a custom object that has the __c
    – Bartley
    Jan 18 '14 at 23:33
5

As far as I know it can't be done with SOQL.

You probably could try with Analytics API but it has some limitations.

The "old school" way would be to download all report types and report definitions to Eclipse IDE (or with any other tool of your choice). If you'd have > 5,000 reports the retrieval would have to be split into chunks - for example fetch few folders at a time.

Report definitions will be shown as XML files (sample is at the bottom of Metadata API page for Report object).

You'll then be able to run text searches on the XML files (Ctrl+H in Eclipse but you could also use Windows "Find in files" or anything really). Search for your custom object's API name (Xyz__ - ideally without the c at the end because you might see Xyz__r sometimes).

Personally I like Notepad++ "find in files" - easy to select the search results and paste to text file or Excel...

If that's too much work - go to the object's definition, clear the "allow reports" checkbox and soon your users will tell you which reports are related to that object ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.