R – Microsoft.Reporting.* vs XML/XSLT


I would like to add reporting capabilities to a .NET application. My data source is just the data model of the application, i.e. a bunch of objects that may have been generated or loaded from anything (not necessarily from a database).

The initial plan was to generate a report data XML file from these objects, and then use XSLT to transform this into an XHTML report file. The report can then be shown in the application with a browser control.

However, I've noticed that there exist Microsoft.Reporting.* namespaces and from what I've tried, it seems that the classes and controls in there can also take care of my reporting. Would it be a good idea to use this instead? Will it save work compared to the XML/XSLT approach? What limitations (if any) of the Microsoft Reporting framework am I likely to run into?

Best Solution

A couple of things to consider.

1) Reporting Services are part of Sql Server, so you may have an extra license issue if you go that route.

2) Reporting Services can serve up web pages, or be used in WinForms with full paging, sorting, sub reports, totals etc etc - that's really hard in XSL. It will also play nicely with printers.

3) Reporting services comes with a WYSIWYG editor to build reports. It's not perfect by any means, but a lot easier than hand crafting.

4) Using XSL to create XHTML can be real performance hit. XSL works on an entire XML Dom, and that maybe a big document if you're dealing with a multipage report. I'd expect Reporting Services to work a lot faster.

5) Reporting Services can leverage the whole of .Net, so you can get a lot of other functionality for free.

Taking all that on board, using Reporting Services will save you time, unless your reporting requirements are very simple. It is less fun though.