This might work. However, I believe a PersistenceManager does not load DataTables until it actually retrieves data for a matching entity.
The PersistenceManager only loads the schema for a given type (e.g., Employee) when it needs it (as prior to the first retrieval of entities of that type), or when you call its InitializeSchema() method, telling it the type you want a schema for.
>>
What I really want to know is which reporting tool to use. I’m getting sick of Crystal, and SQL Reports seems to not function well with objects. I’ve fed it objects, and it works fine with the entity type you pass it, but if you try to get a property of a related entity, it doesn’t work. I think it is not using property descriptors to retrieve values, but it just getting the “physical” properties of the object.
<<
There is a syntax in SQL Reports for referencing nested properties down to one level (e.g., Customer.CompanyName on an Employee object), but I can’t, unfortunately, remember what it is, and I’ve lost the example where I did it. I was, however, unable successfully to use a property nested any farther than that. However, I had a student in class last month who swore you could do it, using just a slight variation of the same syntax I used. Can’t confirm, but he was very definite about his claim that it worked.
>>
What I really want to know is which reporting tool to use. I’m getting sick of Crystal, and SQL Reports seems to not function well with objects. I’ve fed it objects, and it works fine with the entity type you pass it, but if you try to get a property of a related entity, it doesn’t work. I think it is not using property descriptors to retrieve values, but it just getting the “physical” properties of the object.
So I guess my other options are ActiveReports and XtraReports. I was hoping to find a simple way to stick with Crystal for now because it is free and we already have a bunch of developers with a long history of using it (minimal retraining).
<<
I’ve had students claim that Crystal, also, will now work with business objects – basically ever since the release after .NET 2.0. On the other hand, if that is supported, I don’t think the support is very good. I haven’t met anybody who really seems to like Crystal. Absent good support for objects, you’ll always have the issue with Crystal of having to reproduce the logic for custom properties. All I know for sure is that (a) you can use it against an in-memory DataSet or DataTable, either of which you can get through the PersistenceManager’s DataSet property; and (b) at least as of a year or so ago, its performance was pretty sluggish when you did so. I got the impression it was only really good at reporting directly off of a database. But that was a year ago, and none of these products stand still. Crystal always seemed to live far from the leading technological edge, though.
I haven’t done a *lot* of work with any of the report writers – nobody in IdeaBlade has, actually – but I have done a few simple master-detail reports in XtraReports and found the support for working against objects quite good, including support for deep nesting. Also, I know we have at least one large customer that uses XtraReports extensively (Ward tells me) and is extremely pleased with it.
I did a simple report with ActiveReports once, and found it okay, though nested properties were a little more trouble to work with in ActiveReports than in XtraReports, at the time. On the other hand, Jay (Traband) said he had looked at the object model for ActiveReports one time and liked what he saw. He likes to write reports from code, so he kind of looks at things from that viewpoint. ActiveReports, compared to XtraReports, is expensive, and it’s a much higher profile product for the company that produces it than XtraReports is for Developer Express, so you’d think they must give you *something* good for your investment.
In the experiments I’ve done, the support for nested properties seemed to be a key issue; but I also noticed that everybody seemed to be getting gradually better with it, over time, presumably as working with objects becomes more widespread.
What’s the take-away from all this? If I were faced with finding a good report writer to work with DevForce I’d definitely focus my energies on the two you’ve identified, and take the time to learn enough about each to do a report or two that’s representative of the real-world reports I need to create. Wish I could tell you more, but we don’t have deep expertise in this department. I’m trying to see if we can do a survey to get feedback from a cross-section of our customers.