ReportViewer control in vs2005
Hi all,
I am creating a custom reports interface based on SQL Server reporting services 2005.
I'm using the reportviewer control in vs2005 to show my server reports. Now, I have an authentication error. I need the control to pass through some custom network credentials ... How would I do this?
I'm trying the following:
VB Code:
ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote
ReportViewer1.ServerReport.ReportServerCredentials = New System.Net.NetworkCredential("test", "test")
ReportViewer1.ServerReport.ReportServerUrl = New Uri("Http://REPORTSERVER/Reportserver")
ReportViewer1.ServerReport.ReportPath = "/admin/merchant master file"
ReportViewer1.ServerReport.Refresh()
But I'm getting the error:
Quote:
System.InvalidCastException: Unable to cast object of type 'System.Net.NetworkCredential' to type 'Microsoft.Reporting.WebForms.IReportServerCredentials'. at Report.Page_Load(Object sender, EventArgs e) in \\Nccptws001\wwwroot\NetReports\Report.aspx.vb:line 48
How could I do this?
Thanks