Create SSRS Report in SQL Server

Introduction

We will learn how to do the following in this article:

  • Create a SQL Server Reporting Services (SSRS) report.
  • Configure the reporting server.
  • Deploy the report.

SSRS is a tool for building a report and publishing it. If we need to build a report using the SSRS tool, we need to install Business Intelligence Development Studio (BIDS). Then we can make the report.

Here I have shown a simple demo.

Create SSRS Report

Start VS 2012, then go to "File" -> "New" -> "Project...".

Create SSRS Report 

Go to the Business intelligence Tab, select Project server project Templa, change the project name, and click OK.

Create SSRS Report 

Then right-click on the Report folder in Solution Explorer and click on the Add New Report command as shown.

Create SSRS Report 

Then in this Report Wizard window, click on the Next button.

Create SSRS Report 

Then select the data source in which we need to rename the name of the data source and select the type of data source,e and then click on the edit button for the connection string.

Create SSRS Report 

Here we need to configure the data source connection string. For that, we need to provide the server name, enter the authentication, select your database, and then click ok.

Create SSRS Report 

After configuration, we can see the connection string in this box. Then click the Next button.

Create SSRS Report 

When we click on the next window, this window appears. This window appears because we have selected SQL Server Authentication in the previous window. Here we need to provide the username and password of the server we entered into the previous window.

Create SSRS Report 

Then this window appears. In this window, we need to write a T-SQL statement depending on your requirements and then click the Next button. Here I want to show all the employee data in the report.

Create SSRS Report 

Then this window appears. In this window, we need to select the report type. Here two options are available, one is Tabular, and the second one is Matrix. You can choose the type depending on your requirements and then click the Next button. Here I select the tabular format for the report.

Create SSRS Report 

Then this window appears. In this window, we can configure the data display. Then click the next button.

Create SSRS Report 

We can select the table style using this window and then click the Next button.

Create SSRS Report 

Then this window appears. This is the last step of the report configuration with the data source. Then Click on the Finish button.

Create SSRS Report 

After clicking the Finish button, we can see this window. Here we can see two tabs; one is Design, and the other one is Preview. When we click on the Preview tab, we can see a preview of the data.

Create SSRS Report 

When we click on the Preview tab, we need to provide the authentication details and click on the View Report button.

Create SSRS Report 

Here we can see the preview of the data.

Create SSRS Report 

Configure SQL Server Reporting Server

After creating the report, we need to deploy the report to the report server, but before deploying the report, we need to configure the report server.

To configure the reporting services, we need to open the SQL Server Reporting Services Configuration Manager.

Configure SSRS 

Here we need to configure the server. For this, provide the server and instance names from the dropdown list. Then click on the Connect button.

Configure SSRS 

From this window, we get the report server URL. Click on this URL.

After clicking on the URL, you might get this error.

Configure SSRS 

If you get this error, then fix this error. Run your Internet Explorer as administrator, copy the URL from the error page, and paste it into the other window of Internet Explorer. Then we can see this window.

Configure SSRS 

Deploy SSRS Report

After configuring the report server, we need to set the project's properties. For that, right-click on the project, then select the properties option.

Deploy SSRS Report 

Provide this http://yourcomputername/ReportServer_MSSQL URL in the TargetServerURL property, then click the Apply button and OK.

Deploy SSRS Report 

Then we can deploy the project.

Before deploying the project, we need to run VS 2012 as administrator.

Deploy SSRS Report 

After successful deployment, we see a success message in the output window.

Deploy SSRS Report 

Then we see the deployed report here.

Deploy SSRS Report 

Clicking on this report provides the authentication details, then click the view report window. Then we can see the deployed report.

Deploy SSRS Report 

Summary

This article taught us how to create SSRS Reports in SQL Server. Thanks for reading my article.


Similar Articles