SSRS Tutorial: Part 1 - Create A Simple Report

Introduction

This article explains the following,

  • How to create an SSRS project.
  • How to add shared data sources to your Project.
  • How to add a shared dataset to your Project. 
  • How to add a report to your Project.
  • How to populate the data by using a shared dataset.

Here are the steps to create a simple report in SSRS, 

Step 1. If you're using a Microsoft SQL server, then go to Start and click on Search and select SQL Server Data Tools.

create-a-simple-report-in-ssrs-part-1

If you're using SQL server 2008r2 or earlier versions, go to Start, Microsoft SQL Server, and select SQL server Business Intelligence studio.

Step 2. Click on File Menu, and expand New, then select Project,

Project

After that, expand Business Intelligence and select Reporting Services and Report Server Project Wizard. Give a meaningful name to your Solution and Project. Specify an appropriate location for where you want to save this Project by clicking on Browse.

browse

Step 3. Create Shared DataSource

Go to Solution Explorer and right-click on Shared Data Sources, expand Add, then click on New Item.

New Item

Then you will see the following wizard. Provide the data source name in this article. I gave it as DB_Jaipal. And then, click on Edit to make the connectionString.

shared data

After clicking on Edit, we have to provide the following Connection Properties,

  • Select the Server name.
  • Select the "Use SQL Server Authentication" radio button.
  • Enter the User name and Password in the password text box.
  • Check the "Save my password" checkbox.
  • Select the "Select or enter a database name:" radio button.
  • Select the database to which you want to set the connection.
  • Click on the "Test Connection" button to ensure the connection can be established.

connection properties

If the connection is established successfully, then the following wizard will come. Then click on OK.

connection

Step 4. Shared DataSet

Go to Solution Explorer, right-click on Shared Datasets, and then Add New Dataset.

Add dataset

Next, provide the dataset name and data source. And then select the Query type as Text and write your query in the Query text field. Then click OK.

shared dataset properties

Step 5. Report

Go to Solution Explorer - Right-click Report, then click Add -- > New Item

Report

Select Report, provide the meaningful name to your Report and then click Add.

Report1

Some shortcut keys

  • ToolBox (Ctrl + Alt + X),
  • Report Data (Ctrl + Alt + D),
  • Solution Explorer (Ctrl + Alt + L),
  • Properties (F4).

Step 6. Drag and Drop a table on the design surface. And a table has two sections Header and Data. In the Header, the section provides the column name; in the Data section, populate the data concerning the column.

Data Section

Click on the Data section, select the Use a Shared DataSet radio button, name it to your dataset, and click OK.

deemployee

Step 7. To populate the data in the Data section with your dataset, provide the column name in the Header section and select the appropriate properties in the Data section as follows.

Data Section

Step 8. Next, click On Preview and see the report preview.

Result

Conclusion

This article taught us how to create an SSRS project and add some data to the Project with its various steps in SQL Server.


Similar Articles