Posts

Showing posts from May, 2011

ReportViewer control in web application story

Most articles out there talk about adding a report viewer control in Visual Studio to a windows form. If we need to add the same control to a web application, it isn't as straight forward. The following is my ReportViewerControl in web app story. After hours of trial and error and frustration, this is what worked for me. Follow the directions at http://msdn.microsoft.com/en-us/library/ms251669.aspx to create your web application. My report was running on native mode so the report server url was http://(myserver-name)/ReportServer and the report path does NOT have a .rdl extension. Next we have to implement the interface IReportServerCredentials to authenticate through to the server that hosts the actual report. It was not easy to find one clean solution and therefore I blog about it. using System; using System.Configuration; using System.Net; using System.Security.Principal; using Microsoft.Reporting.WebForms; public partial class POCReportViewerControl : System.Web.UI.Page { pro