In my way of doing things, you do all the work that you can in a stored procedure and then send the result to the reporting platform.
Today we're creating a stored procedure and feeding it to a Pivot in Mercury BI