views:

52

answers:

1

I'm working on a project involving the .NET ReportViewer, and I'm having issues connecting to the Report Server.

I'm a .NET newbie so bear with me. I can't put up the code but hopefully someone will be able to give me a little guidance here. I dragged the ReportViewer control from the toolbox onto a newly created page. Eleventy billion issues later, I got to the point where it looks like it's connecting to the appropriate server.

Now, I don't have any C# code in here. It's all in these fustrating tags.

So, I have a tag. Nested within, a tag. The ServerReport tag has 2 attributes, ReportPath and ReportServerUrl. I added a second, ReportServerCredentials, but do not know how to format it. Every example I've seen has been using C# code to create the object, but I'd like to do this without going down that route.

Is there a way to pass a user and password using the ReportServerCredentials="" attribute?

A: 

Default authentication provider for reporting services is windows authentication. So, if you want to connect to reporting services via reporviewer you should use a windows credential. on the other hand you have options to implement forms authentication or use custom authentication you have developed.

If you are using windows client you may set the credential easily as follows:

ReportViewer1.ServerReport.ReportServerCredentials.NetworkCredentials = System.Net.CredentialCache.DefaultCredentials;

For ASP.NET i suggest you to look at SSRS ReportServerCredentials thread. If it doesn't meet your requirements then you may need to implement IReportServerCredentials to send your username and password to the report server.

Hope this help.

orka