Wednesday, May 27, 2020

How to Retrieve the XML for Objects in SSRS

SSRS stored a bunch of different objects in the Catalog table.

Sample query only gets reports ([Type] has several other "types"):

SELECT
ModifiedDate
,  [Path]
, CASE [Type]
    WHEN 2 THEN 'Report'
  END AS TypeName
, CAST(CAST(content AS varbinary(max)) AS xml)
, [Description]
FROM ReportServer.dbo.[Catalog] 
WHERE
  [Type] IN (2)
ORDER BY ModifiedDate DESC

The content CASTs will render as a hyperlink in SSMS; click and you can view the XML.

No comments:

Post a Comment