Friday, March 23, 2012

reporting services Permission question

I posted a report to reporting server, and link the report to asp.net
reportviewer
i link the report to the reportviewer by
Me.ReportViewer1.ServerReport.ReportServerUrl = New
Uri("http://localhost/Reportserver")
Me.ReportViewer1.serverReport.ReportPath = Server.MapPath("Report1.rdl")
however it doesn't have permission to load the report
how can i implicity to pass the user name and passwor to the reportserver
by code?Use networkcredential... look under system.net
Here is the line of code you need:
rs.Credentials = New System.Net.NetworkCredential(RSUserName, RSPassword,
RSDomain)
Where RS is the object to your reporting service web service.
RSUserName, RSPassword, and RSDomain are variables of type string.
Cheers!
=-Chris
"joe" <joe@.discussions.microsoft.com> wrote in message
news:92D8757A-6378-451C-B68B-32E2D8DC538D@.microsoft.com...
>I posted a report to reporting server, and link the report to asp.net
> reportviewer
> i link the report to the reportviewer by
> Me.ReportViewer1.ServerReport.ReportServerUrl = New
> Uri("http://localhost/Reportserver")
> Me.ReportViewer1.serverReport.ReportPath = Server.MapPath("Report1.rdl")
> however it doesn't have permission to load the report
> how can i implicity to pass the user name and passwor to the
> reportserver
> by code?|||any good links or examples, thanks you
"Chris Conner" wrote:
> Use networkcredential... look under system.net
> Here is the line of code you need:
> rs.Credentials = New System.Net.NetworkCredential(RSUserName, RSPassword,
> RSDomain)
> Where RS is the object to your reporting service web service.
> RSUserName, RSPassword, and RSDomain are variables of type string.
> Cheers!
> =-Chris
>
> "joe" <joe@.discussions.microsoft.com> wrote in message
> news:92D8757A-6378-451C-B68B-32E2D8DC538D@.microsoft.com...
> >I posted a report to reporting server, and link the report to asp.net
> > reportviewer
> > i link the report to the reportviewer by
> >
> > Me.ReportViewer1.ServerReport.ReportServerUrl = New
> > Uri("http://localhost/Reportserver")
> > Me.ReportViewer1.serverReport.ReportPath = Server.MapPath("Report1.rdl")
> >
> > however it doesn't have permission to load the report
> > how can i implicity to pass the user name and passwor to the
> > reportserver
> > by code?
>
>

No comments:

Post a Comment