.netwinformsreportingcredentialsmicrosoft-reporting

Microsoft ReportViewer Control READONLY


I successfully used the Microsoft ReportViewer Control on a webpage recently belonging to the Microsoft.Reporting.WebForms namespace. I used a property of the ReportViewer called Server.ReportServerCredentials to set the credentials (domain, user and password). I've been able to display reports which are on a remote server.

Now, I need to do something similar but I need the report in a windows form. The problem I'm having is that I'm using the control belonging to the Microsoft.Reporting.WinForms namespace and the property ReportServerCredentials is READONLY.

Why is it that for one control this property is readonly and the other not considering you need to set the credentials to access the report? How do I work around this?


Solution

  • This doesn't really answer your question per se, but I would skip using the WinForms report viewer. See my answer here for why, and how to do it a better way with a web browser (you could even leverage your Web app that already accesses the reports).