Report Integration

Now the existing report should be integrated into the application.

Select the application form (Form1) in design view and drag ReportViewer icon from the toolbox onto the form.

Select the ReportViewer control, and open the smart tags panel by clicking the triangle on the top right corner. Click the "Choose Report" drop-down list and select the PilotReport. A BindingSource (PilotBindingSource) is automatically created corresponding to the Pilot data source used in the report.

Open the code view for the Form1. Find Form1_Load function and add the following code:

Db4oManager takes care of opening db4o connection on the first request. However the connection should be closed manually on the application termination: