NHibernate for Reporting...

time to read 1 min | 158 words

Just finished writing some fairly complex reports. The reports are complex enough that I decided that it isn't worth my time to try to build a stored procedure to do it, and I simply used NHibernate to get the data. The simplest report had 14(!) parameters, but the main issue was handling security and running business logic as part of the report. (Specifically, a lot of date calculations).

To be clear, I am talking about using NHibernate as a data source for a report, not generating the report itself. That is done with reporting services, which is talking to an NHibernate backed Web Service. Of course, this has the predictable result of:

ayende.DislikedTools.Add( Microsoft.SqlServer.ReportingServices, 
     ReasonsForDislike.DoesNotSupportRightToLeft | ReasonsForDislike.XPathWhoNeedsXPath );