ReportViewer in ASP 2.0

D

DougS

I'm trying to run a SQL Server Reporting Services report from an ASP.Net 2.0
application.

Try
Me.rptvw1.ProcessingMode = ProcessingMode.Local
Me.rptvw1.ServerReport.ReportServerUrl = New
Uri("http://myserver/ReportServer")
Me.rptvw1.ServerReport.ReportPath = "/Folder1/Report1"
Me.rptvw1.ServerReport.ReportServerCredentials = New
System.Net.NetworkCredential("domain\user", "pw")
Me.rptvw1.ServerReport.Refresh()
Catch ex As Exception
Me.lblError.Text = ex.Message
End Try

I'm getting this exception: Unable to cast object of type
'System.Net.NetworkCredential' to type
'Microsoft.Reporting.WebForms.IReportServerCredentials'.

Is this the right approach to display a report in an aspx page? I cant find
any code examples anywhere.

Thanks,
DougS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top