Tuesday, July 13, 2010

First Report in SSRS 2008

In this article, I will explain how to create a simple report (that could be first report for a newbie) using SSRS 2008. Here I am assuming that you have successfully installed SQL Server 2008 along with SSRS.

There are two ways to create Reports in SSRS. You can develop the report manually, or you can use the Report Wizard to give yourself a head start. For this first report, I am going to take advantage of the wizard.

STEP 1:
To begin, start a new Business Intelligence project in Visual Studio 2008 by clicking on Start --> All Programs --> SQL Server 2008 --> SQL Server Business Intelligence Development Studio. Then, from the menu, select File --> New --> Project to open New Project wizard. Now select Report Server Project from Visual studio installed templates and specify Name, Location and Solution Name. I am specifying these ReportProjectSSRS, D:\Hari, and ReportProjectSSRS respectively as shown below:












STEP 2:
In Solution Explorer, right click on Reports folder and select Add New Report. This will open Report Wizard. Click Next on the Welcome screen and this will bring you to the Select the Data Source screen.








STEP 3:
Enter the name of Data Source as dsLocal and select type as Microsoft SQL Server. Now click on Edit button to set the connecting string for data source, this will open Connection Properties window. Enter Server name and database name and click on Test Connection buttion to make sure the connection is established. Click OK button twice to close Test Results and Conection Properties windows.






















You can check the Make this a shared data source checkbox to make this data source as shared so that it can be used for other reports as well. Now click on Next to proceed.




















STEP 4:
This will open Design the Query wizard. Here you can define your Query string. Alternatively you can use Query Builder... to build your query. I will use below query to pull data from Employee table:

SELECT
   [Emp_code],[Emp_Name],[Desg],
   [Head],[DOB],[Basic],[Dept_Code]
FROM Employee (NOLOCK)
 
Click Next to proceed. It will display Select the Report Type wizard. Select Tabular option and click Next to proceed.
 
STEP 5:
Now you can see Design the Table wizard. Select required fields from Available fields and clicked on details button to make these fields available in details part of a report. You can do data grouping as well using Group button. Click Next to proceed.





















STEP 6:
Now you can see Choose the Table Style wizard. Select default style Slate and click Next. Finally you can see Completing the Wizard. Enter report name FirstReport and click Finish to complete the wizard.





















Thats all. We are done with our First report in SSRS 2008. Report at design time will look like one shown below:









Click on Preview to generate the report:

4 comments:

  1. This page definitely has all of the information and facts I wanted about this subject and didn’t know who to ask. onsite mobile repair bangalore There's certainly a lot to learn about this subject. I love all of the points you have made. asus display repair bangalore You have made some good points there. I looked on the internet to find out more about the issue and found most individuals will go along with your views on this web site. huawei display repair bangalore

    ReplyDelete
  2. Having read this I thought it was extremely informative. I appreciate you spending some time and effort to put this informative article together. I once again find myself spending a significant amount of time both reading and posting comments. But so what, it was still worth it! online laptop repair center bangalore Hello! I could have sworn I’ve visited this site before but after going through a few of the articles I realized it’s new to me. Anyhow, I’m certainly pleased I came across it and I’ll be book-marking it and checking back frequently! dell repair center bangalore

    ReplyDelete
  3. Good article! We are linking to this great article on our website. Keep up the great writing. macbook repair center bangalore This is a good tip particularly to those new to the blogosphere. Simple but very precise info… Thank you for sharing this one. A must read article! acer repair center bangalore

    ReplyDelete

Here are few FREE resources you may find helpful.