views:

395

answers:

4

Say I have an application that used an ORM (I am thinking of nHibernate or LINQ to Entities) for data access. How do I provide my users with the ability to do reporting against the properties of my objects? All the end user report designers I know of talk directly to a database, but I don’t like having to repeat logic in reports that are already in the application’s objects.

Are there yet any standard solutions?

I am hoping for a system that use reflection (or some other method) to get the schema from my objects, then lets the user build up a linq query that can run against an IQueryable that I provide.

Having to write all the data retrieval logic myself is not appealing. Creating DataSets to represent all my objects is even less appealing. (If I liked Datasets I would not be looking at ORM systems)

Is the new .NET RIA Services a good bases for a solution?

A: 

You could use a SSRS reports but not use the server based report. I think they called them local reports.

In this mode you provide the data to the report as opposed to the report getting the data, so conceptually you would write a method to convert your objects into a dataset that would then be passed into the report.

JoshBerke
+2  A: 

You may also have a look at XtraReports from DevExpress

XtraReports can generate reports from any data source that implements IList, ITypedList or IBindingList interface.

alex
Didn't know that thanks
JoshBerke
I've also had good results using other DevExpress components in this mannner.
Tom Bushell
A: 

Come check out Data Dynamics Reports. We allow you to specify the data set that the end users will see in the designer, but you can load the data from an arbitrary source behind the scenes. In fact we have special data source support for a collection of objects. A couple of screencasts that are relevant to what you're after are the following:

  • UserDesignerControl.LocateDataSource & Xml Data Provider Additions: This is actually XML-focused walkthrough, but note how they use LocateDataSource to supply the data on demand and the user gets to look at a simple data set that you, as the developer have complete control over. Since we have an ObjectDataSource for binding to collections of objects, you can easily apply this same scenario to binding to objects.
  • Field Selector in Designer for End Users: This one shows some of the field selector capabilities in the designers that your end users can use to select fields.

All other screencasts are at http://www.datadynamics.com/Products/DDRPT/#screencasts

Here is a "quick start article" on a blog (by an ActiveReports support team member) that shows how to use Linq with ActiveReports.

We also have a knowledge base article on our website that goes step-by-step through to bind a linq query to ActiveReports.

A customer has also written in detail how he uses ActiveReports with data from Linq in his applications here.

Scott Willeke
Data Dynamics / GrapeCity
scott
To whoever voted this down, I'd appreciate a comment explaining why. I've reread the question and as best I can tell my answer duly answers the crux of the question "How do I provide my users with the ability to do reporting against the properties of my objects?".
scott
scott
A: 

A lot of the 3rd party report designer let you generate reports from your own data source. E.g. DataSet, IList, etc

None of them yet seem to let users design report using Ling type queries etc.

(If anyone comes up with a better answer, I will delete this answer and set the better answer as the expected answer.)

Ian Ringrose