Tuesday, February 21, 2012

ReportViewer with Authentication

I'm new to Reporting Services but have built some reports and have implemented them. I have used the report viewer which works great and has a great tool bar that users really like. One problem, I can't figure out how to pass network credentials using the viewer.

If I use the ReportingService class I can pass the credentials and everything is great except that I lose the nice tool bar.

I want the best of both worlds without having th build my own toolbar. This must have been done before but I can't seem to find any samples.

So is there a way to pass credentials (Basic Authentication over SSL) while still using the nivce features from the ReportViewer.

Or

Is there a different ReportViewer that has this capability.

Any help will be greatly appreciated.

ThanksDoes anyone have any info on this? Does a ReportViewer control with the ability to pass credentials exist or do I need to create my own?

Thanks,
|||the short answer is "yes".

the devil is in the details...
are you using rs 2000 or 2005 ?
if 2005 I am also trying to get the details down.

I did some work with rs 2000 and see that a lot is the same but the winforms control is new and I hear they "made things better" but so far found few samples of how to get from "A" to "B".
I do know that there are two calls that deal with auth, one to pass data-source credentials and one to pass in "access" credentials.

the access bits seem to have several options.

when I was doing some hacking throuhg they did not seem to work.

I think that was due to messing with the report server and hosing it's settings.

right now I am building a test-lab with a local server and a Virtual PC to run my client app.

I hope I can get a sample working and share....

Big Smile|||I'm using RS 2000. We may go to 2005 in the future but the immediate need is for 2000.

|||

mcatet wrote:

I'm using RS 2000. We may go to 2005 in the future but the immediate need is for 2000.

Ok, a few things:

1) you want to use *WINDOWS* credentails
2) look at the docs and as I recall you will see that you needs to create an object and then attach it to your calls.... System.Net.NetworkCredentails
you can create one with user,pass,domain and then pass that to the web services at key points.

I am working 2005 now so I'm not readig the 2000 docs right now but I think that the above will start you in the right direction....|||Ok. So with windows credentials setup on the ReportServer web folder, I just need a windows domain account on the server (LocalServerDomain\RSExec). Then pass those credentials.

I have that part working using the ReportingServices class.

What would be really nice is if I could use the Microsoft ReportViewer control for my reports (because I like the appearance of it) while still passing the credentils to it. The ReprotingServices class has a viewer toolbar but it doesn't look as nice.

Is this possible, and if so, do you have sample code I could look at?

Thanks for your help.

|||Just keeping this up front so people see it.

Anyone else have an additional info pertaining to an RS2000 ReportViewer with authentication being passed?

Thanks,
|||I am using RS2005.
IF i call ReportingService2005 web service, i know how i can use windows credentails. for this i use NetworkCredentails. However, i couldnt find out how i can set reportviewer credentails to windows credentails.
Could u help me?|||

Looks like this has been sitting around for a little while:

for SSL - set the URL of the ReportViewer control to start with https.

for specifying the credentials to use, you should use the IReportServerCredentials Interface

http://msdn2.microsoft.com/en-us/library/microsoft.reporting.winforms.ireportservercredentials.aspx

Hope that helps,

-Lukasz

No comments:

Post a Comment