To add a DotNet object to Crystal Report as a data source from Business Layer you should do a simple procedure.
Why I needed it? I’m working on an old project of mine. It’s a WinForm project and I’m updating it to WPF and adding more layers to the architecture of the project. In my old project I connected the reports directly to SQL server but now I have a Business Layer that use a Data Access Layer to connect to the database. I still want to use my old Crystal Report Reports but feeding them with Business Layer Services. and using the models there. and I store all of my Reports in a Report Project. so here comes the trouble.
If your model is in the same project It’s easy to add it as the data source. but if it’s in another project (like Business layer) it’s a little bit tricky.
Open your Database Expert and Under Create New Connection Select Ado.Net XML and then Create a new Connection
Then You enter the class full name on Class name box and you’re done.