I am trying to show a group of reports that are accessible by the logged in user in a VF page. Is there are any object where this info is stored ?

Any pointers would be of great help.


1 Answer 1

SELECT Id, Name, OwnerId FROM Report



For explanation on OwnerId see how is the report owner set?

But the result set will be incomplete - you can't retrieve standard reports that way (the reports that when accessed from UI don't have Ids but long URLs with lots of params). And also the names of standard folders (like "Administrative Reports") won't show up (Could not retrieve standard folder Names when we query Folder Object).

To be fair I think this will return reports that are visible to the user (= sit in the folders he has access to). Whether he can actually run them (some of them use object he doesn't have access to for example) is entirely different story...

Last but not least: Daniel's trick mentioned in Can report data be accessed programatically? is also inspiring but well, kind of screenscraping.

And also you can check out the programmatic access to reports and their results (opt-in fresh feature from Summer'13) but the way I understand it from StackOverflow - you'll need to have reportid obtained beforehand.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .