This question is not strictly related to CSLA but i'm scrathing my head to solve my problem so will ask and hope.
I need to provide reports (Crystal Reports) in my application and am trying to work out how to base those reports on business objects rather than dorectly against the database.
I understnad I need to use strongly typed datasets to creat these reports (correct me if im wrong please) and can use the Csla.Data.ObjectAdapter to generate a dataset based on a BO at runtime.
How do I generate a stronglty typed dataset against my BO? Has anyone actually done this?
I'm under a lot of pressure to produce these reports quickly and don't want to revert to running directly against the database as I believe this is definately the wrong way to go, especially when these reports require business logic to be applied and that logic already exists withint my BO's.
TIA
Smeat
Hi Smeat,
I use Crystal in the Windows Forms projects I have. You can pick your object in the Crystal wizard, and use it to design your report. At runtime, you create your object and pass it to the report.
The only things I've had a little trouble with is: 1) At design time, Crystal can't seem to find any objects that are not part of the project that the report is in. So I put my reports and bo's in the same project. 2) If you want to print something that is not a collection, like a CustomerReadOnlyRoot, you have to put it some object that can be iterated through - I can't remeber offhand the necessary interfaces. Anyway for example you can put your object in a List, and pass the List to the report.
Regards,
Mike
Thanks for the responses
By putting the report in the same project as the BO's I was able to bind the report directly against my business object.
Nice and easy :)
Smeat
Copyright (c) Marimer LLC