<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>ssrsphp Wiki Rss Feed</title><link>http://ssrsphp.codeplex.com/wikipage</link><description>ssrsphp Wiki Rss Description</description><item><title>Updated Wiki: Home</title><link>http://ssrsphp.codeplex.com/wikipage?version=10</link><description>&lt;div class="wikidoc"&gt;&lt;a href="#Overview"&gt;Overview&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=ssrsphp&amp;DownloadId=115201" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="#Code Sample"&gt;Code Sample&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=ssrsphp&amp;DownloadId=115201" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="#Contributors"&gt;Contributors&lt;/a&gt;&lt;br /&gt;
&lt;h1&gt;Overview &lt;a name="Overview"&gt;&lt;/a&gt;&lt;/h1&gt;
The &lt;b&gt;SQL Server Reporting Services (SSRS) SDK for PHP&lt;/b&gt; is a library that uses the SQL Server Reporting Services SOAP APIs to enable PHP developers to leverage the SSRS Business Intelligence/Reporting features in their application. &lt;br /&gt;&lt;br /&gt;The library is designed to make simple for developers to call the SSRS remote APIs to perform the following operations:
&lt;ul&gt;&lt;li&gt;Query for the list of reports available on the server&lt;/li&gt;
&lt;li&gt;Query for the list of parameters required for each report with the list of valid values&lt;/li&gt;
&lt;li&gt;Query the list of Formats supported by the Server&lt;/li&gt;
&lt;li&gt;Execute a Report&lt;/li&gt;&lt;/ul&gt;
&lt;br /&gt;Additional links and information can be found on the Interoperability Bridges website: &lt;a href="http://www.interoperabilitybridges.com/projects/sql-server-reporting-services-sdk-for-php" class="externalLink"&gt;http://www.interoperabilitybridges.com/projects/sql-server-reporting-services-sdk-for-php&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=ssrsphp&amp;DownloadId=115305" alt="getreports-example.jpg" title="getreports-example.jpg" /&gt; &lt;br /&gt;
&lt;h1&gt;Code Sample&lt;a name="Code Sample"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;pre&gt;
// include the SSRS library
require_once &amp;#39;SSRSReport.php&amp;#39;;

define(&amp;quot;REPORT&amp;quot;, &amp;quot;/AdventureWorks 2008 Sample Reports/TopStoresBegin&amp;quot;);
$settings = parse_ini_file(&amp;quot;app.config&amp;quot;, 1);
// Create a connection to the SSRS Server
$rs = new SSRSReport(new Credentials($settings[&amp;quot;UID&amp;quot;], $settings[&amp;quot;PASWD&amp;quot;]),$settings[&amp;quot;SERVICE_URL&amp;quot;]);

// Load the report and specify the params required for its execution
$executionInfo = $rs-&amp;gt;LoadReport2(REPORT, NULL);
$parameters = array();
$parameters[0] = new ParameterValue();
$parameters[0]-&amp;gt;Name = &amp;quot;ProductCategory&amp;quot;;
$parameters[0]-&amp;gt;Value = &amp;quot;1&amp;quot;;
$parameters[1] = new ParameterValue();
$parameters[1]-&amp;gt;Name = &amp;quot;StartDate&amp;quot;;
$parameters[1]-&amp;gt;Value = &amp;quot;1/1/2003&amp;quot;;
$parameters[2] = new ParameterValue();
$parameters[2]-&amp;gt;Name = &amp;quot;EndDate&amp;quot;;
$parameters[2]-&amp;gt;Value = &amp;quot;12/31/2003&amp;quot;;
$parameters[3] = new ParameterValue();
$parameters[3]-&amp;gt;Name = &amp;quot;ProductSubcategory&amp;quot;;
$parameters[3]-&amp;gt;Value = &amp;quot;2&amp;quot;;
$rs-&amp;gt;SetExecutionParameters2($parameters);

// Require the Report to be rendered in HTML format
$renderAsHTML = new RenderAsHTML();

// Set the links in the reports to point to the php app

$renderAsHTML-&amp;gt;ReplacementRoot = getPageURL();

// Set the root path on the server for any image included in the report
$renderAsHTML-&amp;gt;StreamRoot = &amp;#39;./images/&amp;#39;;

// Execute the Report
$result_html = $rs-&amp;gt;Render2($renderAsHTML,
                                 PageCountModeEnum::$Actual,
                                 $Extension,
                                 $MimeType,
                                 $Encoding,
                                 $Warnings,
                                 $StreamIds);

// Save all images on the server (under /images/ dir)
    foreach($StreamIds as $StreamId)
    {
        $renderAsHTML-&amp;gt;StreamRoot = null;
        $result_png = $rs-&amp;gt;RenderStream($renderAsHTML,
                                    $StreamId,
                                    $Encoding,
                                    $MimeType);

        if (!$handle = fopen(&amp;quot;./images/&amp;quot; . $StreamId, &amp;#39;wb&amp;#39;))
        {
            echo &amp;quot;Cannot open file for writing output&amp;quot;;
            exit;
        }

        if (fwrite($handle, $result_png) === FALSE)
        {
            echo &amp;quot;Cannot write to file&amp;quot;;
            exit;
        }
        fclose($handle);
    }
// include the Report within a Div on the page
echo &amp;#39;&amp;lt;html&amp;gt;&amp;lt;body&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;#39;;
echo &amp;#39;&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;#39;;
echo &amp;#39;&amp;lt;div style=&amp;quot;overflow:auto; width:700px; height:600px&amp;quot;&amp;gt;&amp;#39;;
    echo $result_html;
echo &amp;#39;&amp;lt;/div&amp;gt;&amp;#39;;
echo &amp;#39;&amp;lt;/div&amp;gt;&amp;#39;;
echo &amp;#39;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&amp;#39;;

&lt;/pre&gt;&lt;br /&gt;
&lt;h1&gt;Contributors &lt;a name="Contributors"&gt;&lt;/a&gt;&lt;/h1&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=DotNetServicesRuby&amp;amp;DownloadId=47295" /&gt;&lt;/td&gt;&lt;td&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=ssrsphp&amp;DownloadId=115200" alt="Persistent.jpg" title="Persistent.jpg" /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; Microsoft is the project sponsor and provides architectural guidance and best practices for this SDK.  &lt;/td&gt;&lt;td&gt;  &lt;a href="http://www.persistentsys.com/" class="externalLink"&gt;Persistent Systems Ltd.&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; is an award-winning technology company specialized in software product development services. The Company’s proven processes for entire product lifecycle helps customers increase revenue, margin and enhance brand value.&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>jccim</author><pubDate>Fri, 09 Apr 2010 17:37:14 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20100409053714P</guid></item><item><title>Updated Wiki: Home</title><link>http://ssrsphp.codeplex.com/wikipage?version=9</link><description>&lt;div class="wikidoc"&gt;&lt;a href="#Overview"&gt;Overview&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=ssrsphp&amp;DownloadId=115201" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="#Code Sample"&gt;Code Sample&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=ssrsphp&amp;DownloadId=115201" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="#Contributors"&gt;Contributors&lt;/a&gt;&lt;br /&gt;
&lt;h1&gt;Overview &lt;a name="Overview"&gt;&lt;/a&gt;&lt;/h1&gt;
The &lt;b&gt;SQL Server Reporting Services (SSRS) SDK for PHP&lt;/b&gt; is a library that uses the SQL Server Reporting Services SOAP APIs to enable PHP developers to leverage the SSRS Business Intelligence/Reporting features in their application. &lt;br /&gt;&lt;br /&gt;The library is designed to make simple for developers to call the SSRS remote APIs to perform the following operations:
&lt;ul&gt;&lt;li&gt;Query for the list of reports available on the server&lt;/li&gt;
&lt;li&gt;Query for the list of parameters required for each report with the list of valid values&lt;/li&gt;
&lt;li&gt;Query the list of Formats supported by the Server&lt;/li&gt;
&lt;li&gt;Execute a Report&lt;/li&gt;&lt;/ul&gt;
&lt;br /&gt;Additional links and information can be found on the Interoperability Bridges website: &lt;a href="http://www.interoperabilitybridges.com/projects/sql-server-reporting-services-sdk-for-php" class="externalLink"&gt;http://www.interoperabilitybridges.com/projects/sql-server-reporting-services-sdk-for-php&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=ssrsphp&amp;DownloadId=115305" alt="getreports-example.jpg" title="getreports-example.jpg" /&gt; &lt;br /&gt;
&lt;h1&gt;Code Sample&lt;a name="Code Sample"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;pre&gt;
// include the SSRS library
require_once &amp;#39;SSRSReport.php&amp;#39;;

define(&amp;quot;REPORT&amp;quot;, &amp;quot;/AdventureWorks 2008 Sample Reports/TopStoresBegin&amp;quot;);
$settings = parse_ini_file(&amp;quot;app.config&amp;quot;, 1);
// Create a connection to the SSRS Server
$rs = new SSRSReport(new Credentials($settings[&amp;quot;UID&amp;quot;], $settings[&amp;quot;PASWD&amp;quot;]),$settings[&amp;quot;SERVICE_URL&amp;quot;]);

// Load the report and specify the params required for its execution
$executionInfo = $rs-&amp;gt;LoadReport2(REPORT, NULL);
$parameters = array();
$parameters[0] = new ParameterValue();
$parameters[0]-&amp;gt;Name = &amp;quot;ProductCategory&amp;quot;;
$parameters[0]-&amp;gt;Value = &amp;quot;1&amp;quot;;
$parameters[1] = new ParameterValue();
$parameters[1]-&amp;gt;Name = &amp;quot;StartDate&amp;quot;;
$parameters[1]-&amp;gt;Value = &amp;quot;1/1/2003&amp;quot;;
$parameters[2] = new ParameterValue();
$parameters[2]-&amp;gt;Name = &amp;quot;EndDate&amp;quot;;
$parameters[2]-&amp;gt;Value = &amp;quot;12/31/2003&amp;quot;;
$parameters[3] = new ParameterValue();
$parameters[3]-&amp;gt;Name = &amp;quot;ProductSubcategory&amp;quot;;
$parameters[3]-&amp;gt;Value = &amp;quot;2&amp;quot;;
$rs-&amp;gt;SetExecutionParameters2($parameters);

// Require the Report to be rendered in HTML format
$renderAsHTML = new RenderAsHTML();

// Set the links in the reports to point to the php app

$renderAsHTML-&amp;gt;ReplacementRoot = getPageURL();

// Set the root path on the server for any image included in the report
$renderAsHTML-&amp;gt;StreamRoot = &amp;#39;./images/&amp;#39;;

// Execute the Report
$result_html = $rs-&amp;gt;Render2($renderAsHTML,
                                 PageCountModeEnum::$Actual,
                                 $Extension,
                                 $MimeType,
                                 $Encoding,
                                 $Warnings,
                                 $StreamIds);

// Save all images on the server (under /images/ dir)
    foreach($StreamIds as $StreamId)
    {
        $renderAsHTML-&amp;gt;StreamRoot = null;
        $result_png = $rs-&amp;gt;RenderStream($renderAsHTML,
                                    $StreamId,
                                    $Encoding,
                                    $MimeType);

        if (!$handle = fopen(&amp;quot;./images/&amp;quot; . $StreamId, &amp;#39;wb&amp;#39;))
        {
            echo &amp;quot;Cannot open file for writing output&amp;quot;;
            exit;
        }

        if (fwrite($handle, $result_png) === FALSE)
        {
            echo &amp;quot;Cannot write to file&amp;quot;;
            exit;
        }
        fclose($handle);
    }
// include the Report within a Div on the page
echo &amp;#39;&amp;lt;html&amp;gt;&amp;lt;body&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;#39;;
echo &amp;#39;&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;#39;;
echo &amp;#39;&amp;lt;div style=&amp;quot;overflow:auto; width:700px; height:600px&amp;quot;&amp;gt;&amp;#39;;
    echo $result_html;
echo &amp;#39;&amp;lt;/div&amp;gt;&amp;#39;;
echo &amp;#39;&amp;lt;/div&amp;gt;&amp;#39;;
echo &amp;#39;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&amp;#39;;

&lt;/pre&gt;&lt;br /&gt;
&lt;h1&gt;Contributors &lt;a name="Contributors"&gt;&lt;/a&gt;&lt;/h1&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=DotNetServicesRuby&amp;amp;DownloadId=47295" /&gt;&lt;/td&gt;&lt;td&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=ssrsphp&amp;DownloadId=115200" alt="Persistent.jpg" title="Persistent.jpg" /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; Microsoft is the project sponsor and provides architectural guidance and best practices for this PHP Toolkit.  &lt;/td&gt;&lt;td&gt;  &lt;a href="http://www.persistentsys.com/" class="externalLink"&gt;Persistent Systems Ltd.&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; is an award-winning technology company specialized in software product development services. The Company’s proven processes for entire product lifecycle helps customers increase revenue, margin and enhance brand value.&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>jccim</author><pubDate>Fri, 09 Apr 2010 17:36:21 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20100409053621P</guid></item><item><title>Updated Wiki: Home</title><link>http://ssrsphp.codeplex.com/wikipage?version=8</link><description>&lt;div class="wikidoc"&gt;&lt;a href="#Overview"&gt;Overview&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=ssrsphp&amp;DownloadId=115201" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="#Code Sample"&gt;Code Sample&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=ssrsphp&amp;DownloadId=115201" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="#Contributors"&gt;Contributors&lt;/a&gt;&lt;br /&gt;
&lt;h1&gt;Overview &lt;a name="Overview"&gt;&lt;/a&gt;&lt;/h1&gt;
The SQL Server Reporting Services (SSRS) SDK for PHP is a library that uses the SQL Server Reporting Services SOAP APIs to enable PHP developers to leverage the SSRS Business Intelligence/Reporting features in their application. &lt;br /&gt;&lt;br /&gt;The library is designed to make simple for developers to call the SSRS remote APIs to perform the following operations:
&lt;ul&gt;&lt;li&gt;Query for the list of reports available on the server&lt;/li&gt;
&lt;li&gt;Query for the list of parameters required for each report with the list of valid values&lt;/li&gt;
&lt;li&gt;Query the list of Formats supported by the Server&lt;/li&gt;
&lt;li&gt;Execute a Report&lt;/li&gt;&lt;/ul&gt;
&lt;br /&gt;Additional links and information can be found on the Interoperability Bridges website: &lt;a href="http://www.interoperabilitybridges.com/projects/sql-server-reporting-services-sdk-for-php" class="externalLink"&gt;http://www.interoperabilitybridges.com/projects/sql-server-reporting-services-sdk-for-php&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=ssrsphp&amp;DownloadId=115305" alt="getreports-example.jpg" title="getreports-example.jpg" /&gt; &lt;br /&gt;
&lt;h1&gt;Code Sample&lt;a name="Code Sample"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;pre&gt;
// include the SSRS library
require_once &amp;#39;SSRSReport.php&amp;#39;;

define(&amp;quot;REPORT&amp;quot;, &amp;quot;/AdventureWorks 2008 Sample Reports/TopStoresBegin&amp;quot;);
$settings = parse_ini_file(&amp;quot;app.config&amp;quot;, 1);
// Create a connection to the SSRS Server
$rs = new SSRSReport(new Credentials($settings[&amp;quot;UID&amp;quot;], $settings[&amp;quot;PASWD&amp;quot;]),$settings[&amp;quot;SERVICE_URL&amp;quot;]);

// Load the report and specify the params required for its execution
$executionInfo = $rs-&amp;gt;LoadReport2(REPORT, NULL);
$parameters = array();
$parameters[0] = new ParameterValue();
$parameters[0]-&amp;gt;Name = &amp;quot;ProductCategory&amp;quot;;
$parameters[0]-&amp;gt;Value = &amp;quot;1&amp;quot;;
$parameters[1] = new ParameterValue();
$parameters[1]-&amp;gt;Name = &amp;quot;StartDate&amp;quot;;
$parameters[1]-&amp;gt;Value = &amp;quot;1/1/2003&amp;quot;;
$parameters[2] = new ParameterValue();
$parameters[2]-&amp;gt;Name = &amp;quot;EndDate&amp;quot;;
$parameters[2]-&amp;gt;Value = &amp;quot;12/31/2003&amp;quot;;
$parameters[3] = new ParameterValue();
$parameters[3]-&amp;gt;Name = &amp;quot;ProductSubcategory&amp;quot;;
$parameters[3]-&amp;gt;Value = &amp;quot;2&amp;quot;;
$rs-&amp;gt;SetExecutionParameters2($parameters);

// Require the Report to be rendered in HTML format
$renderAsHTML = new RenderAsHTML();

// Set the links in the reports to point to the php app

$renderAsHTML-&amp;gt;ReplacementRoot = getPageURL();

// Set the root path on the server for any image included in the report
$renderAsHTML-&amp;gt;StreamRoot = &amp;#39;./images/&amp;#39;;

// Execute the Report
$result_html = $rs-&amp;gt;Render2($renderAsHTML,
                                 PageCountModeEnum::$Actual,
                                 $Extension,
                                 $MimeType,
                                 $Encoding,
                                 $Warnings,
                                 $StreamIds);

// Save all images on the server (under /images/ dir)
    foreach($StreamIds as $StreamId)
    {
        $renderAsHTML-&amp;gt;StreamRoot = null;
        $result_png = $rs-&amp;gt;RenderStream($renderAsHTML,
                                    $StreamId,
                                    $Encoding,
                                    $MimeType);

        if (!$handle = fopen(&amp;quot;./images/&amp;quot; . $StreamId, &amp;#39;wb&amp;#39;))
        {
            echo &amp;quot;Cannot open file for writing output&amp;quot;;
            exit;
        }

        if (fwrite($handle, $result_png) === FALSE)
        {
            echo &amp;quot;Cannot write to file&amp;quot;;
            exit;
        }
        fclose($handle);
    }
// include the Report within a Div on the page
echo &amp;#39;&amp;lt;html&amp;gt;&amp;lt;body&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;#39;;
echo &amp;#39;&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;#39;;
echo &amp;#39;&amp;lt;div style=&amp;quot;overflow:auto; width:700px; height:600px&amp;quot;&amp;gt;&amp;#39;;
    echo $result_html;
echo &amp;#39;&amp;lt;/div&amp;gt;&amp;#39;;
echo &amp;#39;&amp;lt;/div&amp;gt;&amp;#39;;
echo &amp;#39;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&amp;#39;;

&lt;/pre&gt;&lt;br /&gt;
&lt;h1&gt;Contributors &lt;a name="Contributors"&gt;&lt;/a&gt;&lt;/h1&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=DotNetServicesRuby&amp;amp;DownloadId=47295" /&gt;&lt;/td&gt;&lt;td&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=ssrsphp&amp;DownloadId=115200" alt="Persistent.jpg" title="Persistent.jpg" /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; Microsoft is the project sponsor and provides architectural guidance and best practices for this PHP Toolkit.  &lt;/td&gt;&lt;td&gt;  &lt;a href="http://www.persistentsys.com/" class="externalLink"&gt;Persistent Systems Ltd.&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; is an award-winning technology company specialized in software product development services. The Company’s proven processes for entire product lifecycle helps customers increase revenue, margin and enhance brand value.&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>jccim</author><pubDate>Fri, 09 Apr 2010 17:35:56 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20100409053556P</guid></item><item><title>Updated Wiki: Documentation</title><link>http://ssrsphp.codeplex.com/documentation?version=1</link><description>&lt;div class="wikidoc"&gt;The documentation is part of the download package. Check the readme.txt.&lt;br /&gt;There are install instructions and APIs documentation. &lt;br /&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>jccim</author><pubDate>Fri, 09 Apr 2010 17:33:17 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Documentation 20100409053317P</guid></item><item><title>Updated Wiki: Home</title><link>http://ssrsphp.codeplex.com/wikipage?version=7</link><description>&lt;div class="wikidoc"&gt;&lt;a href="#Overview"&gt;Overview&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=ssrsphp&amp;DownloadId=115201" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="#Code Sample"&gt;Code Sample&lt;/a&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=ssrsphp&amp;DownloadId=115201" alt="arrow_sm.gif" title="arrow_sm.gif" /&gt; &lt;a href="#Contributors"&gt;Contributors&lt;/a&gt;&lt;br /&gt;
&lt;h1&gt;Overview &lt;a name="Overview"&gt;&lt;/a&gt;&lt;/h1&gt;
The SQL Server Reporting Services (SSRS) SDK for PHP is a library that uses the SQL Server Reporting Services SOAP APIs to enable PHP developers to leverage the SSRS Business Intelligence/Reporting features in their application. &lt;br /&gt;&lt;br /&gt;The library is designed to make simple for developers to call the SSRS remote APIs to perform the following operations:
&lt;ul&gt;&lt;li&gt;Query for the list of reports available on the server&lt;/li&gt;
&lt;li&gt;Query for the list of parameters required for each report with the list of valid values&lt;/li&gt;
&lt;li&gt;Query the list of Formats supported by the Server&lt;/li&gt;
&lt;li&gt;Execute a Report&lt;/li&gt;&lt;/ul&gt;
&lt;br /&gt;&lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=ssrsphp&amp;DownloadId=115305" alt="getreports-example.jpg" title="getreports-example.jpg" /&gt; &lt;br /&gt;
&lt;h1&gt;Code Sample&lt;a name="Code Sample"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;pre&gt;
// include the SSRS library
require_once &amp;#39;SSRSReport.php&amp;#39;;

define(&amp;quot;REPORT&amp;quot;, &amp;quot;/AdventureWorks 2008 Sample Reports/TopStoresBegin&amp;quot;);
$settings = parse_ini_file(&amp;quot;app.config&amp;quot;, 1);
// Create a connection to the SSRS Server
$rs = new SSRSReport(new Credentials($settings[&amp;quot;UID&amp;quot;], $settings[&amp;quot;PASWD&amp;quot;]),$settings[&amp;quot;SERVICE_URL&amp;quot;]);

// Load the report and specify the params required for its execution
$executionInfo = $rs-&amp;gt;LoadReport2(REPORT, NULL);
$parameters = array();
$parameters[0] = new ParameterValue();
$parameters[0]-&amp;gt;Name = &amp;quot;ProductCategory&amp;quot;;
$parameters[0]-&amp;gt;Value = &amp;quot;1&amp;quot;;
$parameters[1] = new ParameterValue();
$parameters[1]-&amp;gt;Name = &amp;quot;StartDate&amp;quot;;
$parameters[1]-&amp;gt;Value = &amp;quot;1/1/2003&amp;quot;;
$parameters[2] = new ParameterValue();
$parameters[2]-&amp;gt;Name = &amp;quot;EndDate&amp;quot;;
$parameters[2]-&amp;gt;Value = &amp;quot;12/31/2003&amp;quot;;
$parameters[3] = new ParameterValue();
$parameters[3]-&amp;gt;Name = &amp;quot;ProductSubcategory&amp;quot;;
$parameters[3]-&amp;gt;Value = &amp;quot;2&amp;quot;;
$rs-&amp;gt;SetExecutionParameters2($parameters);

// Require the Report to be rendered in HTML format
$renderAsHTML = new RenderAsHTML();

// Set the links in the reports to point to the php app

$renderAsHTML-&amp;gt;ReplacementRoot = getPageURL();

// Set the root path on the server for any image included in the report
$renderAsHTML-&amp;gt;StreamRoot = &amp;#39;./images/&amp;#39;;

// Execute the Report
$result_html = $rs-&amp;gt;Render2($renderAsHTML,
                                 PageCountModeEnum::$Actual,
                                 $Extension,
                                 $MimeType,
                                 $Encoding,
                                 $Warnings,
                                 $StreamIds);

// Save all images on the server (under /images/ dir)
    foreach($StreamIds as $StreamId)
    {
        $renderAsHTML-&amp;gt;StreamRoot = null;
        $result_png = $rs-&amp;gt;RenderStream($renderAsHTML,
                                    $StreamId,
                                    $Encoding,
                                    $MimeType);

        if (!$handle = fopen(&amp;quot;./images/&amp;quot; . $StreamId, &amp;#39;wb&amp;#39;))
        {
            echo &amp;quot;Cannot open file for writing output&amp;quot;;
            exit;
        }

        if (fwrite($handle, $result_png) === FALSE)
        {
            echo &amp;quot;Cannot write to file&amp;quot;;
            exit;
        }
        fclose($handle);
    }
// include the Report within a Div on the page
echo &amp;#39;&amp;lt;html&amp;gt;&amp;lt;body&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;#39;;
echo &amp;#39;&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;#39;;
echo &amp;#39;&amp;lt;div style=&amp;quot;overflow:auto; width:700px; height:600px&amp;quot;&amp;gt;&amp;#39;;
    echo $result_html;
echo &amp;#39;&amp;lt;/div&amp;gt;&amp;#39;;
echo &amp;#39;&amp;lt;/div&amp;gt;&amp;#39;;
echo &amp;#39;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&amp;#39;;

&lt;/pre&gt;&lt;br /&gt;
&lt;h1&gt;Contributors &lt;a name="Contributors"&gt;&lt;/a&gt;&lt;/h1&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=DotNetServicesRuby&amp;amp;DownloadId=47295" /&gt;&lt;/td&gt;&lt;td&gt; &lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=ssrsphp&amp;DownloadId=115200" alt="Persistent.jpg" title="Persistent.jpg" /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; Microsoft is the project sponsor and provides architectural guidance and best practices for this PHP Toolkit.  &lt;/td&gt;&lt;td&gt;  &lt;a href="http://www.persistentsys.com/" class="externalLink"&gt;Persistent Systems Ltd.&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; is an award-winning technology company specialized in software product development services. The Company’s proven processes for entire product lifecycle helps customers increase revenue, margin and enhance brand value.&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>jccim</author><pubDate>Fri, 09 Apr 2010 17:26:09 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20100409052609P</guid></item></channel></rss>