R – bind subsonic object collection to Microsoft report (rdlc)

rdlcsubsonic

Has anyone been able to use a SubSonic generated collection as a "business object datasource" with Microsoft report (rdlc)? I have generated the SubSonic class code but for some reason the report datasource window is not seeing the class as a potential object collection datasource.

Is there something I need to do for this to work?

Thanks in advance…vsdotnetguy

Best Answer

I have loaded Reporting Service reports from business objects before (loaded via NHibernate -- which isn't exact but close enough for argument sake).

Couple of key points: 1. return your objects in List, even if you are only returning one object. 2. You want FLAT business objects. You might have to go thru a DTO transformation to get that. By flat, I mean the most complex property you can have in a business object is a string and a number (int, decimal, double). If you are expecting to grab a value like this: myObject.Customer.Name, forget it. Create a CustomerName property. 3. If you need data from multiple places try to break up your reports into subreports. You key off of the datasource key to figure out what data to return to the report.

I'll add more as I remember, it has been a few months since I've done this.

Related Topic