Katie & Emil
BI Specialists

Home >SQL Server >SSRS

SSRS XML


SSRS allows to export your report data using XML format which can be very handy if you are asked to provide your data in XML format using SSRS.

The problem is that you can very odd XML nodes and very often you have to modify them and there are two ways to do that:

1) Modify XML Nodes
You can do that by specifing name in DataElementName property. You can change this property on cell level but also on group level (Row group / Column Groups). For Groups you might need to modify the same property which is also under Group Property which you can expand. Also remember about the "advanced mode" (small triangle on the right of "Column Groups") which will show you hidden groups.

This the simpliest way to generate XML using SSRS. The slight issue is that you can get extra nodes which might be rather difficult to remove. SSRS provides certain properties which allow to hide/show output but there certain elements where you cannot do that so these is where you might prefer to choice second option.

2) Apply XLST
XSLT is kind a language which allows you to modify XML files. This is handy when you have one input and you want to generate different XML structures (for instance different customers) based on the same file. This is not as easy as the first option especially with SSRS namespace bug which was fixed in 2008 R2 but you get full control over the XML file generated.

Let me briefly explain how XSLT work with SSRS. You create XSLT, you specify file name in report property, and you deploy it to your server together with the report (same folder). When SSRS is asked to provide report in XML format. It will generate the XML as normal but then appl your XSLT file and generate new XML file by following your XSLT instructions.

Hope that helps
Emil



News & Updates:

You like it? Share it!

Comments Add Comment
No data was returned. Shere your thoughts, questions and suggest improvements:
Add Comment
 Recommend & Share
 

 

 Add Comment