Results 1 to 1 of 1

Thread: ReportViewer control in vs2005

  1. #1

    Thread Starter
    Addicted Member Tjoppie's Avatar
    Join Date
    Aug 2005
    Location
    South Africa
    Posts
    241

    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:
    1. ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote
    2.  
    3.                     ReportViewer1.ServerReport.ReportServerCredentials = New System.Net.NetworkCredential("test", "test")
    4.  
    5.                     ReportViewer1.ServerReport.ReportServerUrl = New Uri("Http://REPORTSERVER/Reportserver")
    6.                     ReportViewer1.ServerReport.ReportPath = "/admin/merchant master file"
    7.                     ReportViewer1.ServerReport.Refresh()

    But I'm getting the error:

    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
    Last edited by Tjoppie; May 13th, 2007 at 04:24 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width