Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

This tutorial will help you to get started with SQL Server Reporting Services (SSRS)

Getting Started with SSRS (SQL Server Reporting Services)

Getting Started with SSRS - Part 8 - Show SSRS Report in ASP.NET Web Page

Dec 15 2011 12:00AM by Karthikeyan Anbarasan   

Introduction

In this article, we will cover how to use the deployed SSRS Report on to the ASP.NET Web application. In our earlier articles we have seen the steps to create and deploy the report to the Reporting Server and administer the deployed reports. In real time, we have seen requirements on accessing the reports from different clients. Let us now move ahead for the step-by-step process on accessing the SSRS report in ASP.NET web pages dynamically.

Steps

Before starting the steps to show the SSRS Report in ASP.NET Page, we should just have a look around on the previous articles to get some fair idea on how to design the report and deploy it to the Report Server.

First, open visual studio 2010 IDE and create a new ASP.NET Project as shown in the screen below. In this example we are going to use the report which we deployed in the Part 2 of this series of articles on SSRS.

Creating a new ASP.NET Web Application Project

Now in the ASPX Page, drag and drop a Scriptmanager tool, a button and a report viewer control from the toolbox as shown in the screen below.

Drag and Dropping the controls to the designer

Double click on the button. This will open a button event as shown in the screen below.

Getting the button control event

In the button click event we need to write our custom code to access the report from the SSRS Server as shown in the screen below.

Code:

            reportViewerSam.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
            reportViewerSam.ServerReport.ReportServerUrl = new Uri("http://sp2010/ReportServer");
            reportViewerSam.ServerReport.ReportPath = "/Part2Sample/Report1";
            reportViewerSam.ServerReport.Refresh();

Code to access the report in the SSRS Server

In the above code, we can have the Report Server URL http://sp2010/ReportServer which we need to change as per the server URL. The report path on which the report is deployed is /Part2Sample/Report1. Also, since we are accessing the server directly we need to provide the processing mode as Remote. Once we are done with the above code, execute the project by clicking the Run button or press F5 (functional key) as shown in the screen below.

Building and Executing the Project

Once the project is build successfully, we can see only the button as shown in the screen below.

Output of the executed project

Now click on Get Reports to access the report directly from the SSRS server. Clicking on Get Report will load the report and we can see the report generating as shown in the screen below.

SSRS report loading on the ASP.NET Page Output

Once the report is generated completely, we can see the report with the well formatted structure that has been deployed to the sever as shown in the screen below.

Final SSRS Report displayed in ASP.NET Page

Conclusion

So, in this article we have seen how to show the deployed SSRS Report in the asp.net web application with ease without doing any formatting or any design.


Karthikeyan Anbarasan
52 · 4% · 1176
6



Submit

3  Comments  

  • Nice but how can pass a parameters to the reports it so important topic to complete this article Thanks

    commented on Dec 17 2011 1:37AM
    Lobna
    733 · 0% · 45
  • This comment is waiting for moderation.

    commented on Nov 20 2016 9:41AM
    edithsuttle
    2826 · 0% · 4
  • This comment is waiting for moderation.

    commented on Nov 20 2016 9:41AM
    edithsuttle
    2826 · 0% · 4

Your Comment


Sign Up or Login to post a comment.

"Getting Started with SSRS - Part 8 - Show SSRS Report in ASP.NET Web Page" rated 5 out of 5 by 6 readers
Getting Started with SSRS - Part 8 - Show SSRS Report in ASP.NET Web Page , 5.0 out of 5 based on 6 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]