February 24, 2021 at 10:09 pm
Greetings, I've found a few threads similar to what I'm looking for but not exactly. I have a couple hundred reports in SSRS, and most of them use a "Shared" data source, but a small handful of them have a "Custom" data source. I am a novice with SQL.
I just need to find out which ones don't use a shared data source. Does anyone have a query I can use to just return a list of reports that use a custom data source, rather than a shared one? Thank you!
February 24, 2021 at 11:13 pm
SELECT
reports.name AS ReportName,
Datasource.Name AS datasource
FROM dbo.Catalog reports
INNER JOIN dbo.DataSource ON DataSource.ItemID = reports.ItemID
WHERE reports.Type = 2
AND NOT EXISTS (SELECT * FROM dbo.Catalog datasources
WHERE datasources.ItemID = DataSource.Link
-- 5 is shared
AND datasources.Type = 5
);
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy