If this is your first time creating an SSRS report, then this is the right article for you. Below is a step-by-step guide that will help you to create, deploy and view your first report using SQL Server Reporting Services 2008:

Environment Check

Assuming the following are installed and already configured on your machine:

  • Installed SQL Server 2008 R2
  • Installed AdventureWork Sample Databases
    (You can visit Microsoft website to download and install it:
    http://msftdbprodsamples.codeplex.com/releases/view/55926
    We are using it in this case as a sample database. However, you can write any SQL statement on one of your pre-installed Databases)
  • Installed SQL Server 2008 Reporting Services
    (If you have not done this, visit this post: SSRS 2008 Installation Guide)
  • Both SQL Server and Reporting Services are installed on the same machine (localhost)

Now we can start the guide walk-through:

1. Open SQL Server Business Intelligence Development Studio (BIDS) by going to:
Start > All Programs > Microsoft 2008 R2 > BIDS

2. From the menu, choose File > New > Projects

image

3. Choose the right template: Report Server Project and type in name of the Project:

image

4. If this is your first time creating a report, then we do need to setup the path where some of the reports are stored while deploying. (We only need to do this once) So, right click on the project name from your Solution Explorer window (on the right side) and choose Properties.

image

5. I would normally leave the settings as default EXCEPT you need to add the value for parameter TargetServerURL which is blank:

image

6. Normally, the Report Server URL is: http://localhost/ReportServer
You can check this by going to: Start > All Programs > SQL Server 2008 R2 > Configuration Tools > Reporting Services Configuration Manager. Then, from left menu choose Web Sever URL and under Report Server Web Service URL, you will find the address which is setup. You can always replace the long ugly machine name with localhost:

image

7. Type in the Server URL and click OK:

image

8. Now, we begin to add Reports to our project. To do this, right click on Reports folder and choose Add > New Item:

image

9. Type in the name of your report: ContactList.rdl and click Add

image

10. Report Wizard will start. Although, you can create report manually without wizards, for the purpose of this first exercise we continue with the wizard. Click Next:

image

11. Every report need a DataSource to know which database to connect to. As this is the first time, we have to create this. Click on Edit:

image

12. Type in Server Name: localhost. I have setup the SQL Server to accept Window Authentication. Otherwise, enter SQL Server Authentication:

image

13. Choose the database that you want to work with and click OK to finish:

image

14. Now that we have created the connection string, click on Next to continue (note that you also tick the box Make this a shared data source to use for future reports):

image

15. In the next step, it will ask to to type in the Query String. There are two ways of doing this, either use Query Builder or write in your own code. I prefer the later, so I have opened SSMS and wrote my select statement which return the result that I have to use in my report. I will also run it to make sure the syntax is connect. Copy the code to the clipboard:

image

16. Page the code in the Query String and click Next:

 1: SELECT
 2:     Title,
 3:     FirstName,
 4:     LastName,
 5:     EmailAddress,
 6:     Phone
 7: FROM Person.Contact
 8: WHERE Title IS NOT NULL

image

17. Depending on the report choose the type. This is a simple basic report so we are going to use Tabular. Click Next:

image

18. In this step, the wizard allows you to do Grouping but for the purpose of this exercise, we will have a simple report that return lost of all names. Also, we have already specified the columns that we want in our SELECT query; therefore, we want to select all the available fields and click the Details button to move them to the Details section:

image

19. We can see all fields are in the Details section. Click on Finish:

image

20. You can type in or change the name of the report and click Finish to end:

image

21. We can see the report is now created. To view the report click on Preview tab:

image

22. The preview Tab will run and render the report to see the outcome result:

image

23. So, now that we have created the report and preview it, we can need to Deploy it to the Report Server so that it can be viewed and accessed by end-users. To do this, right click on the report file (ContactList.rdl) and choose Deploy:

image

24. Remember that we have to setup the Target Report Server URL correctly before deploying. If all is done correctly, we will see the successful message in the Output result dialog box. This is a confirmation that the report has successfully built, deployed and ready to be viewed:

image

25. To view the report which has just been deployed, open IE browser and type in: http://localhost/Reports

This is the address where all Reports are deployed and can be accessed by end-user. We can also see that reports are in a Folder structure similar to Window Files. Click on MyFirstReport folder:

image

26. And finally to view the report, click on ContactList:

image

27. Here is the report displayed on your web-browser:

image

28. Finally, a very useful feature of SSRS reports is the ability to export them into PDF, Excel, or Word:

image

This article is a step-by-step walk through of SSRS 2008 installation on a virtual machine. If you are going to install SSRS on a physical machine, then the steps are still similar and you can benefit from it.

Environment Check List

To follow the steps, you would need to have the following programs installed and configured on your machine:

  • Have already setup a virtual machine. I am using VMware with Windows XP as guest operating system (if you need help to do this, read article: How to install VMware Player?)
  • Have already installed SQL Server 2008 R2 on your machine (without the Reporting Services)
  • Have already created an ISO image from the installation disk
    (If you need help to do this, read article: How to create ISO disk image?)

If you have the above installed and ready, here are the steps:

1. This first thing we need to do is to boot the virtual machine. Once the guest operating system is on, we have to mount the optical disk drive to the ISO image which we have already created and contains the installation files. To do this, right click on the CD icon located on the bottom right of your VMware Player window box and choose Settings:

image

2. Be default the connection is set to use physical drive. Choose, Use ISO image file and browse to the directory were file is stored then click OK:

image

3. If the ISO image is connected successfully, you will see the file mounted as your CD drive in My Computer window:

image

4. Right Click on the CD drive and choose Open to view the content. Browse to the appropriate folder directory (D:\English\SQLServer2008R2\Developer) and double click on the installation file Setup:

image

5. SQL Server Installation Center will open:

image

6. From the left menu, choose Installation and then click on New installation or add features:

image

7. Setup checks if you have the necessary support files. Click OK:

image

8. Click install:

image

9. The system checks if you have all the required software dependencies. If any of the rules fail for you, then setup will provide a link which contains further instructions. You have to install the prerequisites software before you can proceed. In this case, all rules passed and we click on Next:

image

10. Since we are adding the Reporting Services to an existing instance of SQL Server, we will select the second option and click Next:

image

11. The next window asks to select the new features that we want to add. Select (Tick) Reporting Services & Business Intelligence Development Studio and click Next:

image

12. Another check. Click Next:

image

13. Checking Disk Space Requirement. Click Next:

image

14. Next is server configuration which asks you to associate an Account to use for the Reporting Services. I am choosing SYSTEM (You can also create a separate account), click Next:

image

15. Choose Install, but do not configure the report server and click Next:

image

16. If you want to report errors to Microsoft, then tick the box; otherwise, click Next to continue installation:

image

17. Another check for installation rules. Click Next:

image

18. Setup is almost ready to proceed with the actual installation. Click Install:

image

19. Setup is complete and Reporting Services is added.

image

20. It is time now to configure the Reporting Services. Browse to:
Start > All Programs > Microsoft SQL Server 2008 R2 > Configuration Tools > Reporting Services Configuration Manager and click on it: (we can also see that SQL Server Business Intelligence Development Studio is installed):

image

21. You will be asked to connect to the Reporting Services. Click Connect:

image

22. If the installation is successful, you will be connected. On your left side, there is a menu which you would need to configure few. The first is Service Account, I have left this to the default which is Local Account but as it was mentioned previously, you can specify a separate account. Now go to next, Web Service URL:

image

23. Under the Web Service URL tab, it is best to leave the Virtual Directory name as defaulted to ReportServer. This is common and widely known. Click on Apply to deploy this configuration.

image

24. Under Database tab, Reporting Services store all reports and related information in separate database. Since this is the first time, we do not have them. Click on Change Database to create them.

image

25. Follow the steps in next few screens to create the reporting databases:

image

image

image

image

image

image

26. Now go to the next tab Report Manager URL. Leave the virtual directory as Reports and click on Apply to deploy the configuration. You will see once its done green checks under Results section.

For the purpose of this exercise, I am not going to skip Email Settings but you can add your details there if you want reports to be scheduled and sent to email address. Click on Exit to finish.

image

 

27. Finally, there are two important URL which allow us to access the Reporting Services:

http://localhost/Reports
(This is where all reports are going to displayed once deployed. It is also the place where users can view and run reports)

http://localhost/ReportServer
(This is the location where reports are going to be deployed to)

To check that everything is done correctly and the installation is successful, to test this, open your internet explorer and type the above URL, you should see this:

image

image