Generating a Multiple Table Crystal Report using VS 2005
(Page 1 of 4 )
In a previous article generating a Crystal Report using the Crystal Report items that comes with a default installation of Visual Studio 2005 was described. Whereas the previous article utilized data from a single table for report generation, the present article shows how you may obtain data from multiple tables for the report.
In this tutorial, as in the previous one, Crystal Reports and CrystalReportViewer objects will be used. Crystal Report may be created both for Windows and Web applications; the report created in this tutorial is for a Windows application.
Creating a Crystal Reports application
It is very easy to create a Crystal Report application. From the File menu item click on the New Project...drop-down item. This brings up the New Project window. Highlight Visual Basic under the Project Types, and under Visual Studio installed templates, choose the Crystal Report Application. This will add a default file name. Change it to something suitable. In this case this has been changed to MultiTable as shown in the next picture.

.
Now click on the button labeled OK. This creates the project files and also opens up, in the tab, CrystalReport1.rpt as shown. This window can be the starting point for creating different kinds of reports such as Standard, Cross-Tab and Mail Label using the Report Expert. You may also begin with a blank report and build it step-by-step from scratch. It is also possible to modify an existing report to generate a new report with different formatting and even changed data.

In this tutorial a standard report will be created that uses data from multiple tables. Accepting the defaults, Using the Report Wizard and the Expert to produce a Standard report, click on the OK button.
The Standard Report Creation Wizard
This pops-up the Standard Report Creation Wizard as shown where you choose the data needed for the report. We will use the data from an MS Access database such as the one in the Northwind.mdb example database that is bundled with MS Access.
Next: Choosing a Data Connection >>
More Database Articles
More By Jayaram Krishnaswamy