Now click on the Design a new report task. The opens the Report Wizard window as shown in the figure.
The application can obtain data from these different resources. Click on the Database icon and then click on the Next button.
This displays the window where you need to select a connection to the data source. If there are existing connections you should be able to see them in the drop-down list box
Making a Connection to Get Data
This source can be changed by clicking on the Change... button. This will bring up the Change Data Source window where you can choose.
As found in this version you have the following options.
Microsoft SQL Server option lets you connect to SQL 2000 or 2005 using the .NET Framework Data Provider for SQL Server.
Microsoft SQL Server Compact 3.5 lets you connect to a database file.
Microsoft SQL Server Database File lets you connect to a Local Microsoft SQL Server Instance including a SQL Express. Although it is not explicitly stated what these versions are.
For this tutorial the Compact 3.5 will be used (also uses a .NET Framework Data Provider of Compact 3.5).
Click on the OK button in the Change Data Source window.
VS 2008 installation also installs a database file on the computer for the SQL Server Compact 3.5.
Click on Browse button (you could also create one if you like, herein it will be browsed). This brings up the Select SQL Server Compact 3.5 Database File window with the default location where the database file is parked as shown in the next figure
Click on the Northwind icon in the window and click on the Open button. This updates the Add Connection window with this information as shown in the next figure.
You may test the connection by hitting the Test Connection button which should display a successful outcome as shown in the next figure. There is no need for a password as you are the owner.
Click OK twice and this will take you back to the Data Source Configuration Wizard updating the connection information which you may review as shown in the next figure.
Click on the Next button. This brings up the Microsoft Visual Studio message window giving you the option to bring this data source to your project.
To keep matters simple the Customers table data will be used in fashioning this report. Place a check mark for the Customers and expand the Customers table node as shown. Also choose the columns that should appear in the report by choosing them with check marks as shown
Designing the Report
When you click on the Finish button you will add a NorthwindDataSet to the Project. Click on the Finish button. This adds a NorthwindDataSet.xsd file to the Project and a new wizard, Report Wizard pops-up requiring you to select the data source. It will display the columns you selected in the earlier step.
You get a chance to add another data source at this point should you choose to do so. Here only the data chosen earlier will be used. Click on the Next button
Choosing Layout of Data
Click on the Next button to display the window where you may choose a table layout. A stepped layout is chosen as shown.
Choosing a Report Style
Click on the Next button to display the style for the report one may choose. Here the 'Corporate' style is chosen as shown.
Clicking on the Next button brings up the summary page for the report as shown.
Click on the Finish button. After a while the the report design shows up as Report1.rdlc[Design] as shown in the next figure.
Further design changes can be made to the report as needed.
Click on Choose Data Sources which displays the next window shown.
Click the OK button on this screen. Now build the project and run the form with the green arrow menu item.
This brings up the form and after a little processing the report gets displayed.
This tutorial described designing a simple report using the VS 2008 IDE. The reader will benefit from reading the earlier referenced articles. Compared to VS2005, the options for data source connectivity appears to be limited. The publishing of the report to a web server will be described in a future article.