Thursday, 23 July 2009

Reading RDL Definitions directly from a ReportServer database

Just a quick post: I recently had to extract the report definitions (RDL) directly from a ReportServer database, as the ReprtServer installation was broken. This should be straightforward, but requires some work to convert the data to a readable format. This can be done with the following SQL query:

select convert(varchar(max), convert(varbinary(max), content))
from catalog
where content is not null


Anonymous said...

Excellent, this is just what I needed!

hantu7 said...

your awesomeness is awesome!!!!!!!
Thank you. Exactly what I required.

Zeox said...

Works perferctly Thx

Neetu said...

Hi, I have deployed the reports ussing SSRS. can i know where SSRS reports stores in report server. can i get a full path. so i can go forward. i know it will store in th catolog table. but i require full path of catalog.

I am using rsscripter to automate the reports. but there i hv to give the outputpath. that has to be in SSRS reports path. where they r actually storing.

Pls let me know the extact path. so i can go further.


t said...

Many many thanks.

Elijah C said...

var n = 1;
for (i = 0; i < n; ++i)
Console.WriteLine("Thank you!");

Si Le said...

I tried this, and it worked on a small RDL, but truncated on a larger file. Another issue: introduced additional/unreadable characters.

Please help in fine tuning this code. Thanks very much.

Unknown said...

My RDL is truncated at 980 lines.

I am using SQL Server Management Studio 2014.

Is there a workaround?

JP said...

converting to XML will pull more characters into the MSSQL result (see Options, Query Results, SQL Server, Results to Grid)

SELECT Name, convert (xml, convert (varbinary(max),[Content])) AS ReportRDL
FROM [dbo].[Catalog] where TYPE =2