Create SSRS Report in SQL Server

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 then we need to install Business Intelligence Development Studio (BIDS). Then we are able to make the report.

Here I have shown a simple demo.

Create SSRS Report

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

new project

Go to the Business intelligence Tab then select Project server project Template then change the name of the project then click OK.

report server project

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

add new report

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

next

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

select database

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

select database name

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

select data source

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 rovide the user name and password of the server that we have entered into the previous window.

click ok

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

design the query

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

select report type

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

select table

Using this window we can select the table style and then click the Next button.

select table style

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

complete wizard

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 then we can see a preview of the data.

report 1

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

authentication detail

Here we can see the preview of the data.

report

Configure Reporting server

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

For the configuration of the reporting services we need to open the SQL Server Reporting Services Configuration Manager.

sql server

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

sql server 2014

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


After clicking on the URL you might get this error.

error

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

home

Deploy report

After the configuration of the report server we need to set the properties of the project. For that right-click on the project then select the properties option.

report project

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

TargetServerURL

Then we can deploy the project.

Before the deployment of the project we need to run VS 2012 as administrator.

deploy

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

message in output window

Then we see the deployed report here.

report project 2

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

deploy report

Thanks for reading my article.

Up Next
    Ebook Download
    View all
    Learn
    View all