Ram
Ram

Reputation: 691

How to generate SSRS report using the code (xml)?

I want to know if there is a way to generate a SSRS report using the xml code. Here's the xml code for an empty report. I would like to design the report and store the xml code in the tables and generate the SSRS report using the xml code in the table?

<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<Body>
<Height>2in</Height>
<Style />
</Body>
<Width>6.5in</Width>
<Page>
<LeftMargin>1in</LeftMargin>
<RightMargin>1in</RightMargin>
<TopMargin>1in</TopMargin>
<BottomMargin>1in</BottomMargin>
<Style />
</Page>
<AutoRefresh>0</AutoRefresh>
<rd:ReportUnitType>Inch</rd:ReportUnitType>
<rd:ReportID>259e5507-dcf1-443d-884f-cfcf7816f9b2</rd:ReportID>
</Report>

Upvotes: 0

Views: 1482

Answers (1)

Rich
Rich

Reputation: 2279

Hopefully this will give you enough to know what to look for next:

As RDL is XML-based you can indeed generate the XML using your chosen method, then deploy the resultant RDL to the server, and then execute it. However that doesn't make use of SSRS to its full extent, so you might want to instead consider making 'local reports' which don't need SSRS to run, otherwise known as RDLC files. They are similar to RDL files with some differences, but you wouldn't need to deploy them first before running.

Upvotes: 1

Related Questions