php-ssrs has been on code.google.com for the last year or two, where it was neglected. We decided to move it to github, which should allow easier access and collaboration.
Category: SSRS
Posts on Sql Server Reporting Services and the php-ssrs SDK.
php-ssrs v0.1
A beta release of php-ssrs, a PHP SOAP client for Sql Reporting Services, that I helped write with Ideal Websites is now available for download.
Grab a copy of it from the Google Code project page here: php-ssrs
The QuickStart guide should be all you need to get going, there are also more detailed samples available in the download. Getting a rendered report is made real easy, just take a look at the sample below:
1 2 3 4 5 6 7 8 9 10 11 12 13 | $options = array( 'username' => 'testing', 'password' => 'password' ); $ssrs = new SSRS_Report('http://localhost/reportserver/', $options); $result = $ssrs->loadReport('/Reports/Reference_Report'); $ssrs->setSessionId($result->executionInfo->ExecutionID); $ssrs->setExecutionParameters(new SSRS_Object_ExecutionParameters($result->executionInfo->Parameters)); $output = $ssrs->render('HTML4.0'); // PDF | XML | CSV echo $output; |
ReportService2010.asmx is not the only SSRS 2008 R2 end point
In our on-going quest to create a PHP SDK for Sql Reporing Services 2008 RS, we’ve shot ourselves in the foot by not reading the documentation properly.
The end point documentation states that:
The ReportService2005 and ReportService2006 endpoints are deprecated in SQL Server 2008 R2. The ReportService2010 endpoint includes the functionalities of both endpoints and contains additional management features.
We took this to mean that all end point functions were handled by ReportService2010.asmx but couldn’t find a way to render a report through this service. If we’d read down a little further we could have discovered that execution requests (i.e. rendering reports) is still handled by ReportExecution2005.asmx
As the MSDN documentation concludes, there are three endpoints for Sql Server 2008 RS:
ReportService2010 | Provides the APIs for managing a report server that is configured for either native or SharePoint integrated mode. |
ReportExecution2005 | Provides the APIs for running and navigating reports. |
ReportServiceAuthentication | Provides the APIs for authenticating users against a report server when the SharePoint Web application is configured for Forms Authentication. |
Sql Server Reporting Services SOAP API methods
We’re (trying) to use the SSRS SOAP API at work with a PHP application. We found an open source SDK over at codeplex but soon found it to be badly written, outdated and broken!! We were forced to write our own…
It’s been an interesting process, and we hope to release our library as an Open Source SDK as soon as possible but in the mean time, if you need the documentation and are struggling to find it on MSDN (like we did), its here: http://msdn.microsoft.com/en-us/library/reportservice2010.reportingservice2010.aspx
Hold out for our release, hopefully before the end of March 2011. If you’re interested in more information just leave a comment below!
P.S. That is the 2010 reference, which is what we’ll be coding for (i.e. ReportService2010.asmx?wsdl)