In this book we will create a sample reporting application and we need to install some tools to be ready to start. We will use Microsoft Visual Studio 2012 to design our sample reporting application, Crystal Reports to design the reports, Microsoft SQL Server 2008 as the database engine, and Northwind as a sample database. We will have to install all these applications before we get started.
In this chapter, we will cover the following topics:
Installing Microsoft Visual Studio 2012
Installing Crystal Reports
Installing Microsoft SQL Server 2008
Installing Northwind database
We will use the premium edition in our sample. After downloading the source, extract it, and double-click on the
vs_premium.exe file to begin the installation.
Now that we have downloaded and extracted the source file, let's install it on our machine.
License agreement: As we can see in the following screenshot, we can change the installation directory by clicking on the Browse button and selecting the directory in which we wish to install the files. Check the I agree to the License terms and conditions. checkbox to complete the installation and click on the Next button.
Optional features: As we can see in the following screenshot, we can customize the installation features in Visual Studio. In our reporting sample application, we need Microsoft SQL Server Data Tools and, therefore, we can deselect all other features. But it is better to install all the features on our machine. After we select the features, click on the INSTALL button.
Crystal Reports source can be downloaded from the SAP website at the following URL: http://www.sap.com/index.epx.
Following are the steps to download Crystal Reports:
Click on the Free Trials link as we see in the following screenshot:
Click on SAP Crystal Reports, developer version for Microsoft Visual Studio as we see in the following screenshot:
As we see in the following screenshot, if you have an account, click on log in now else register and click on Download Now to start the download.
Successfully installed: This step tells us that Crystal Reports is installed successfully and asks us if we wish to install 64-bit runtime. Select the checkbox and click on the Finish button as we see in the following screenshot:
Following are the steps to download Microsoft SQL Server 2008:
Search for SQL Server 2008 r2 service pack 2 by typing in
download sql server 2008 r2 service pack 2as we see in the following screenshot:
Select Downloads and click on the first result:
Click on Download:
Choose a compatible version of SQL Server 2008 with your windows. I have Windows 7, 64-bit so I select the
SQLServer200BR2SP2-KB2630458x64-ENU.exeversion of SQL Server 2008 as we see in the following screenshot. Click on the Next button to begin the download.
Following are the steps to install Microsoft SQL Server 2008:
Setup Support Rules: As shown in the following screenshot, Microsoft checks for problems that occur during the installation in order to fix them before the installation process starts. If any of the checks fail, click on Show details >> to find out what went wrong. Correct it, and then click on Re-run. If the test is completed successfully, click on OK.
Product Key: As shown in the following screenshot, we can enter the product key by selecting the Enter the product key: radio button and filling in the product key. To proceed without entering a product key, select Specify a free edition: for evaluating SQL server 2008 and click on Next.
Setup Support Rules: As shown in the following screenshot, Microsoft checks for problems that might occur while installing SQL Server Setup Support files. If there are any problems, we need to fix it before we finish installation. If there are no issues, we can complete the installation and click on Next>.
Feature Selection: As shown in the following screenshot, we will choose what feature we will install on our machine. For basic installation, we need to install only Database Engine Services and Management Tools â Basic. But it is always better to install all the features. After choosing what features you want on your machine, click on Next.
Instance Configuration: As shown in the following screenshot, we can choose to keep Default instance name MSSQLSERVER, or change it to any other name. It is recommended that you keep the default name though. On the other hand, we can change the installation directory to any other directory that has the required space. Click on Next.
Server Configuration: As shown in the following screenshot, we will set up Service Accounts that will be used to run SQL Server. We will use the built-in network service account for all services (this account does not require a password) because we are installing SQL Server on our machine. In the Account Name column, select NT AUTHORITY\NETWORK SERVICE for all the services and click on Next>.
Windows Authentication: When a user connects through a Microsoft Windows user account, SQL Server validates the account name and password using information in the Windows operating system. This is the default authentication mode, and is much more secure than Mixed Mode.
Mixed Mode: This authentication mode allows users to connect by using Windows Authentication and SQL Server Authentication. Users who connect through a Windows user account can use trusted connections that are validated by Windows. If you choose Mixed Mode Authentication, you must set strong passwords for all SQL Server logins.
Choose Mixed Mode (SQL Server authentication and Windows authentication) and enter the password (let's say we use
asd123as SQL Server password). Retype the password to confirm it and click on Add Current User. When this is done, click on Next>.
Reporting Services Configuration: This step, like the previous one, will be skipped if we don't choose Reporting Services Configuration in the feature selection dialog. Keep the default options and click on Next.
Installation Rules: This dialog checks if there are any processes or other installations running, which will interrupt the installation of SQL Server 2008. If there are any issues, we have to fix it before installation. If there are no issues, click on Next.
Complete: We will see a small dialog box telling us that Microsoft SQL server installation has been completed successfully. Click on Close to close this dialog box. Then we will see the main installation center. We can close it. Now you will have to restart the machine.
Now that we have finished installing Microsoft SQL Server, let us install the Northwind database.
Search for the Northwind database download by typing in
download Northwind databaseas shown in the following screenshot:
Click on the first result as we see in the following screenshot:
Click on Download as shown in the following screenshot to start the download:
Following are the steps to install the Northwind database:
Installation Complete: After the scripts have been installed, we will find a folder named
SQL Server 2000 Sample Databasescreated in the
C:\. We will use one of these files to install the Northwind database into SQL Server 2008.
Connect to SQL Server 2008: As shown in the following screenshot, select Database Engine from the Server type: menu, Server name: is localhost (or "."), which represents our machine. The Authentication type is SQL Server Authentication, the same option that we selected during installation. The Login name is
sa, which represents the default user of SQL Server, and the password is
asd123or the password you had entered while installing the SQL Server. After filling in all the fields, click on Connect.
Create Northwind database in SQL Server 2008: Open
C:\SQL Server 2000 Sample Databases. This is where the database scripts are installed. Drag the
filenamedinstnwnd.sqlfile, which contains all SQL scripts required to create the Northwind database on our server, and drop it in SQL Server Management Studio. As we can see in the following screenshot, click on the Execute button to run the scripts.
After all scripts are executed correctly, we will see Northwind in our databases, as can be seen in the following screenshot: