Connecting a Report to the Stock Object
In this section, you create a new Crystal report in the embedded Crystal Report Designer and connect the report to the Stock object.
To connect a Crystal report to the Stock object
- Right-click the project name and click Add New Item.
- In the Add New Item dialog box, select Crystal Report.
- In the Name field, enter "StockObjects.rpt", and then click Add.
- In the Crystal Reports Gallery dialog box, click OK.
- In the Standard Report Creation Wizard dialog box, expand Project Data and the sub node .NET Objects.
A list of classes within the project appears. Each class is prefixed with the project namespace.
- Expand the Stock class to view a selectable sub node.
- Click the right arrow to move the Stock class sub node to the Selected Tables panel, and then click Next.
- Expand Stock and click the >> to move all columns to the Fields to Display panel, and then click Next.
- Select Symbol and click the right-arrow to move into the Group By panel, and then click Finish.
Continue to Binding the Report.