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...".
Go to the Business intelligence Tab, select Project server project Templa, change the project name, and click OK.
Then right-click on the Report folder in Solution Explorer and click on the Add New Report command as shown.
Then in this Report Wizard window, click on the Next button.
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.
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.
After configuration, we can see the connection string in this box. Then click the Next button.
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.
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.
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.
Then this window appears. In this window, we can configure the data display. Then click the next button.
We can select the table style using this window and then click the Next button.
Then this window appears. This is the last step of the report configuration with the data source. Then Click on the Finish button.
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.
When we click on the Preview tab, we need to provide the authentication details and click on the View Report button.
Here we can see the preview of the data.
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.
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.
From this window, we get the report server URL. Click on this URL.
After clicking on the URL, you might get this error.
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.
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.
Provide this http://yourcomputername/ReportServer_MSSQL URL in the TargetServerURL property, then click the Apply button and OK.
Then we can deploy the project.
Before deploying the project, we need to run VS 2012 as administrator.
After successful deployment, we see a success message in the output window.
Then we see the deployed report here.
Clicking on this report provides the authentication details, then click the view report window. Then we can see the deployed report.
Summary
This article taught us how to create SSRS Reports in SQL Server. Thanks for reading my article.