views:

1253

answers:

4

I am designing a website using PHP 5.2.9 and MS Sql Server 2005. I have an SSRS report and I want to set it up so that people over the internet can access it (after they put in a username and password, but i can figure that part out).

Our website is hosted locally on a web server and the database is on a seperate server. I haven't set up the SSRS instance yet.

So any help on figuring out how to do this would be awesome (it's a bit too late in the game to change over to asp.net(

+5  A: 

Simplest way to tackle this is to look into what MS calls "URL Access" which allows you to link to a report hosted on an SSRS installation. Lots of ways to customize through all of the URL Access parameters.

Take a look here: URL Access

Simple Example:

http://<Server Name>/reportserver?/Sales/YearlySalesByCategory&rs:Command=Render

The link above would cause the report to be rendered in the web browser just like a normal page. You can also specify other render modes such as PDF. What I normally do in my applications is for the user to click on a link referencing the report, with the render mode set to PDF. You can then wrap all your security and authentication code around it so it is kept away from those you don't want to use it.

TheTXI
This works for single binary report formats, but not HTML.
cdonner
cdonner: You're going to have to explain what you mean because I am not following you.
TheTXI
TheTXI: If you meant to embed a link to the report on a Web page, the client needs to authenticate, which is impractical on a public site. If you meant that the server should issue the HTTP request to the report server and stream the results back to the client as an attachment (which lets you handle authentication on the server), and this is an HTML stream, it will contain image references that the browser cannot resolve. These references need to be changed by the server on the fly, and there needs to be another component that can handle image requests and redirects them to RS.
cdonner
This is what our Java proxy did, essentially - handle authentication with RS through a service account, rewrite the HTML stream with updated image links, and redirect image requests to the existing report session in RS.
cdonner
+3  A: 

I think your best bet is using the SSRS web service interface. You could funnel the requests through an ASP "proxy". Writing the client from scratch in PHP is probably not advisable (unless you find a ready-to-use component for this, which I did not research). The proxy class is readily available for .Net (see here). Your proxy client could authenticate with a "service account".

Alternatively, you could use the SSRS URL interface. I wrote a Java proxy a long time ago, for SSRS 1.0. The basic approach is probably still valid.

As far as security integration goes, that will depend on whether your users are in an AD domain or not. Authenticating with RS through models other than Windows Integrated Security is not straight-forward and requires customization.

cdonner
I wouldn't want to deal with it, but if you are set on PHP-only, the reporting services services is just a SOAP web service, so you could theoretically use any PHP SOAP stack to interface with it.
Wyatt Barnett
What I was trying to say is that you can download the SOAP proxy for .NET and use it right away. It handles everything out of the box. If possible, Thirster42 could deplay a parallel ASP site that consists of a single page just for the report delivery. This is certainly the fastest way to get this working.
cdonner
A: 

Use the web service as suggested but hide the SSRS server from the internet.

SSRS and SharePoint are simply not internet safe. Ask any MS consultant over a beer if you know one socially.

gbn
i don't know any...
DForck42
A: 

Well I found some documentation from microsoft on the whole matter here. I've got it up and running now so I am happy. although in order for it to be perfect i still need another firewall between the web server and the rest of the network.

DForck42