SSRS reports in an ASP web page
Hello everybody's reading my question! I have some ssrs reports that I would like to publish in an ASP Page. I would like to have a page on which I take a left Top Part where I display the whole reports available as a windows explorer (showing folders of my reports and my reports) and a viewer in the middle of the page to visualise the selected report. If anybody help me in coding this page, I would be very helpful for me since, I'm new in Web development. Thanks in advance!The developer with a heart
May 30th, 2012 4:26am

You add a ReportViewer into your page. <%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %> <rsweb:ReportViewer ID="MyReportViewer" runat="server" Width="100%" Height="100%" SizeToReportContent="True"> </rsweb:ReportViewer> When the users click on the report, you reload the page and set the values for ReportViewer. You can pass the foldername and filename with a session variable. string FolderName = (string)Session["FolderName"]; string FileName = (string)Session["FileName"]; try { MyReportViewer.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote; MyReportViewer.ServerReport.ReportServerUrl = new Uri("http://myserver/ReportServer"); MyReportViewer.ServerReport.ReportPath = "http://myserver/reports/" + FolderName + "/" + FileName + ".rdl"; MyReportViewer.ShowPrintButton = true; } catch { }
Free Windows Admin Tool Kit Click here and download it now
May 30th, 2012 5:00am

Most people I have seen using ASP.NET and want to use SSRS have local reports meaning .rdls which are built within a ASP codeBest Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/
May 30th, 2012 5:03am

Hi IRUSUL Thanks for your answer. So, I have to create an ASP page. Then, I add a report viewer control. I'm not sure how to do it exactely. I mean, how to import reports to ASP page and bound them with the tree control so that when I choose a report from a tree I could display it in the middle of the page. I know how to export my reports in RDL files by report manager... but don't know how to proceed for the rest. Thanks so much againThe developer with a heart
Free Windows Admin Tool Kit Click here and download it now
May 30th, 2012 8:25am

To make a tree for your reports, I would recommend to create a database with two tables: For your foldersFor your files For each file you will specify the folder, and for the folder it parent folder. This way you can create a tree.
May 30th, 2012 1:31pm

Hello, I suggest you that refer to the following articles about integrating ReportViewer control in an ASP.NET web application/site or to a form in a Windows Forms application. Please see: Reporting Services and ReportViewer Controls in Visual Studio 2010: http://msdn.microsoft.com/en-us/library/ms345248(v=sql.105).aspx ReportViewer Controls (Visual Studio): http://msdn.microsoft.com/en-us/library/ms251671(v=vs.100).aspx In addition, you can refer to the article about how to use a ReportViewer control to display a report selected in the TreeView. Please see: http://channel9.msdn.com/Learn/Courses/SQL2008R2TrainingKit/SQL10R2UPD01/SQL10R2UPD01_HOL_04/Exercise-1-Embedding-Reporting-into-an-ASPNET-Application Regards, Bin LongBin Long TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
June 4th, 2012 3:20am

Hello, I suggest you that refer to the following articles about integrating ReportViewer control in an ASP.NET web application/site or to a form in a Windows Forms application. Please see: Reporting Services and ReportViewer Controls in Visual Studio 2010: http://msdn.microsoft.com/en-us/library/ms345248(v=sql.105).aspx ReportViewer Controls (Visual Studio): http://msdn.microsoft.com/en-us/library/ms251671(v=vs.100).aspx In addition, you can refer to the article about how to use a ReportViewer control to display a report selected in the TreeView. Please see: http://channel9.msdn.com/Learn/Courses/SQL2008R2TrainingKit/SQL10R2UPD01/SQL10R2UPD01_HOL_04/Exercise-1-Embedding-Reporting-into-an-ASPNET-Application Regards, Bin LongBin Long TechNet Community Support
June 4th, 2012 3:21am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics