How can I programmatically discover which SSRS reports have an "embedded data source"? I still need to know this.
This question has now been answered"When the following script that lists report names and data sources shows a data source that is NULL is that a report that has an "embedded data source"?"
After checking the 1st report, it only had a shared data source.
--List the reports with the number of executions and time last run, including datasources. SELECT c.Name, COUNT(*) AS TimesRun, MAX(l.TimeStart) AS [LastRun], ( SELECT SUBSTRING( ( SELECT CAST(', ' AS VARCHAR(MAX))+CAST(c1.Name AS VARCHAR(MAX)) FROM [Catalog] AS c INNER JOIN [DataSource] AS d ON c.ItemID = d.ItemID INNER JOIN [Catalog] c1 ON d.Link = c1.ItemID WHERE c.Type = 2 AND c.ItemId = l.ReportId FOR XML PATH('') ), 3, 10000000) AS list ) AS DataSources FROM [ExecutionLog](NOLOCK) AS l INNER JOIN [Catalog](NOLOCK) AS c ON l.ReportID = C.ItemID WHERE c.Type = 2 -- Only show reports 1=folder, 2=Report, 3=Resource, 4=Linked Report, 5=Data Source GROUP BY l.ReportId, c.Name ORDER BY DataSources