We have developed a Basic SSRS Report Chapter-1, and deployed the report to our reporting server in Chapter-2 now we can call the same through the client application. In this section, we will use Asp.net as the client application for calling the report, I am using VS 2010 for the purpose you may use 2010 or any higher version. The steps to do so are.
Step 1: Open Visual Studio. From File menu, choose New->Website. And from the available templates, choose ASP.Net Web site. And click OK button.
Step2: Create a web form CallSSRS.aspx and drag and drop the below controls into the designer layout from toolbox.One ScriptManager control, One Button control and One ReportViewer control.
Step-3: The page will look like
Step 4: Double click on the button and add the below code in the code behind of the Button click event
Protected Sub Button1_Click(sender As Object, e As System.EventArgs) Handles Button1.Click
ReportViewer1.ShowParameterPrompts = False
ReportViewer1.ShowCredentialPrompts = False
Dim paracity As New ReportParameter(“city”, “London”)
ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote
ReportViewer1.ServerReport.ReportServerUrl = New Uri(“http://akanksha/ReportServer”)
ReportViewer1.ServerReport.ReportPath = “/BasicSSRS1/ReportSSRS1”
Catch ex As Exception
Note: Please import Imports Microsoft.Reporting.WebForms on the code page as given in the image
Our report is located at “/BasicSSRS1/ReportSSRS1 path in the server, for this information we can click URIs present in the Report Manger URL of Reporting Services Configuration Manager.
“ReportServerUrl” is the location where your SQL Server Reporting Services is running your can find the value of this parameter from the Report configuration manager as shown below.
While typing in the value of ReportServerUrl in the button script avoid the port 80 as 80 is default port of IIS so need not to be mention in code, so the url will be
On clicking the ReportServerUrl the screen below will appear which gives you the value of ReportPath which indicates the path where our report is deployed.
Note: For running the ASP Project calling the SSRS report you may enable Google Chrome as default browser to avoid any script error initially, it will be explain in letter chapters how to deal with scripts debug of Internet Explorer.
Upon clicking BasicSSRS1 link we can open all the report deployed under the project and can open ReportSSRS1.rdl as shown in the image given below
So, in this section we understand how to call SSRS Report with parameter from client application i.e asp.net application.
Previous Related Post:
Chapter-1: Creating a basic Tabular SSRS Report using Report Wizard
Chapter-2 : Report Deployment on SQL Server 2012 Reporting Server
Chapter-3:Opening/Calling the deployed SQL Server Reporting Server report from Asp.net
Chapter-4 Creating SSRS Matrix Report / Cross Tab Report
Chapter-5 Creating a Sub Report in SSRS
Chapter-6: Creating a Drill Down Report in SSRS
Chapter-7: Working with expressions and custom code in SSRS
Chapter-8-SSRS (Reporting Services) Working with Calculated fields
Chapter-9-Sorting of Column and Custom Paging in SSRS
Chapter-10 : Creating and Deploying Web Services for SSRS
Chapter-11 : Creating SSRS Report by consuming Web Service Data Source
Chapter-12 : Working with Data Bars in SSRS
Chapter-13-Displaying Color in Data Bar Based on Condition
Chapter-14- Displaying Data Labels along with Data Bars in SSRS
Chapter-15-Displaying Indicators in SSRS
Chapter-16-Creating SSRS Linked Report
Chapter-17 Adding or Creating Drop Down Parameter List in SSRS
Chapter-18 Creating Group above or stepped report in SSRS
Chapter-19-Creating Multi Value Parameter Report in SSRS
Chapter-20-Using CSS Stylesheet in SSRS