I'm currently building a task scheduler that emails various types of data reports to recipients.
I've started building a stored procedure in SQL Server to output the Data, but realised that each different report type returns completely different data sets. My idea to solve this problem would be to output the data in XML, removing the problem of different data types being returned.
I would proceed with this, but I've read in various places that this solution is not good in terms of maintainability.
The simplest approach to this would be to have a different stored procedure for each report type, which there are about 12 of, making it possibly very time consuming (especially as I'm relatively new to stored procedures).
The question is, is it practical to follow the XML output approach, or is there a simpler, more elegant way to do it?
Thanks in advance.
Edit: The problem stems from the fact the stored procedure will then be processed by Entity Framework, which I'm guessing wouldn't know how to convert it into class/objects if it had multiple return types.