Juliano A. Felipe
Juliano A. Felipe

Reputation: 584

Export a SSRS 2005 report in XML to PDF

I'm using C# with ASP.NET(2.5) and SQL Server 2005.

I have an SSRS 2005 Report (*.rdl) stored in a varbinary field in the database, and I need to generate a report (in PDF or image file) and send it by e-mail, with some parameters. The CRUD part is OK, but I can't generate the report and export to PDF from an XML string (that I get from the varbinary field).

I don't have any code to give to you folks (sorry). I tried lots of tutorials from the web and none of them suited for me. I also searched here in stack overflow and didn't find anything.

Note 1: I know how to do it from a file stored in a hard drive, for example. I don't want to save the file I get from the varbinary field in the hard drive and generate the report from it. I want to generate the report from the XML string stored in a variable.

Note 2: I'm new to C#, and have another silly question: Crystal Report (.rpt) and SSRS (.rdl) are different files (different XML structures), right?

Upvotes: 2

Views: 865

Answers (1)

crthompson
crthompson

Reputation: 15875

Firstly, in answer to Note 2, Crystal Reports and SSRS are competitors, so yes, the formats are different.

Secondly, you want to use the ReportExecutionService class. If you have any report parameters to set, use SetExecutionParameters() and Render() with Format=PDF.

Upvotes: 2

Related Questions