Connecting Report to an ADO.NET Dataset Object

Started by VelMurugan, Jul 26, 2008, 03:26 PM

Previous topic - Next topic

VelMurugan

Connecting Report to an ADO.NET Dataset Object

From ADO.NET Dataset Object you can add tables to Crystal Report using Database Expert in Crystal Report Designer.

To create a new report and connect it to Dataset object which contains description for Customers table in Northwind database

1. In the Visual Studio .NET Solution Explorer, right-click your project to display the shortcut menu.
2. Point to Add and click Add New Item.
3. In the Add New Item dialog box, select Crystal Report from the Templates area. Click Open.
4. You will be presented with Crystal Report Gallery.
5. You can choose from any of the options provided in Crystal Report Gallery. But for the purpose of this walkthrough choose As a Blank Report and click OK.
6. On File menu, click Save to save the report.
7. Right click in the Report Designer, point to Database, and click Add/Remove Database.
8. You'll be presented with Database Expert wizard.
9. In the Database Expert wizard, expand the Project Data folder, expand the ADO.NET Datasets folder and select the dataset object.
10. If you now drill down Database Fields node, in the Field Explorer, you can view Customers table and all its fields
11. Drag and drop the fields onto the report and format them as required.