Getting Started with SQL Server Reporting Services (SSRS) and PHP


In a recent post I took a look at how to get started with SQL Server Reporting Services (SSRS). In this post I’ll dive into the SSRS SDK for PHP that was recently released by the Interoperability team here at Microsoft. The SSRS SDK for PHP allows you to render render reports from within your PHP code. The documentation in the SDK is complete with explanations for the classes that make up the SDK, code examples, and a “hello world” example. However, in this post, I’ll build a simple web page (code attached to this post) that renders the Sales report that I created last week. My example uses some reporting features that aren’t shown in the “hello world” example, and this way you’ve got multiple examples to work from when you want to use the SDK.

[Edit: If you have trouble setting up user permissions with SSRS, this video may be helpful: https://www.youtube.com/watch?v=PSYHqkhhdOo.)

Overview

With the Business Intelligence Development Studio you can design reports in SQL Server 2008 Reporting Services. You can access these reports directly via the Report Server (as I showed in this post) or you can use the SSRS SDK for PHP, which uses the SOAP API to communicate with the SQL Server Reporting Services Web Service.

image

Prerequisites

Follow the steps in this post for creating the Sales report (based on the Northwind database): http://blogs.msdn.com/brian_swan/archive/2010/04/29/getting-started-with-sql-server-reporting-services-ssrs.aspx.

Create a User with the Right Permissions

I struggled a bit to create a new User that has the permissions necessary to access reports. Perseverance paid off, however. Here’s what I did:

  1. Create a local Windows user (PHPDemoUser) on your machine. You do not need to make PHPDemoUser an Administrator…a Standard user is fine.
  2. Create a login on your SQL Server Express installation for PHPDemoUser. When you create this login you’ll want to qualify it with your machine name: MACHINE_NAME\PHPDemoUser.
  3. Add PHPDemoUser as a user for the Northwind and ReportServer$SQLEXPRESS databases. Give the user dbdatareader and dbdatawriter priviliges.
  4. Modify the rsreportserver.config configuration file located under the ReportServer installation folder (C:\Program Files\Microsoft SQL Server \MSRS10.SQLEXPRESS\Reporting Services\ReportServer in most common scenarios). You might need to open the text editor with Administrator privileges. Add the <RSWindowsBasic/> element to the <AuthenticationTypes> node (if other nodes are already included, don’t delete them):

<Authentication>
    <AuthenticationTypes>
        <RSWindowsNegotiate/>
        <RSWindowsNTLM/>
        <RSWindowsBasic/>
    </AuthenticationTypes>
    <EnableAuthPersistence>true</EnableAuthPersistence>
</Authentication>

Connect to the Report Server Web Service

To connect to the Report Server Web Service, we simply need to create a new SSRSReport object (passing in the credentials of the PHPDemoUser and the service URL). If we are toggling an item in the report (as we would do when drilling into the products that make up a category in the Sales report), we call the ToggleItem method. Otherwise, we simply load the report:

require_once ‘SSRSReport.php’;
define("UID", ‘MACHINE_NAME\PHPDemoUser’);
define("PWD", "PHPDemoUser_PWD");
define("SERVICE_URL", "
http://localhost/ReportServer_SQLEXPRESS/");
define("REPORT", "/Sales");

$ssrs_report = new SSRSReport(new Credentials(UID, PWD), SERVICE_URL);
if (isset($_REQUEST[‘rs:ShowHideToggle’]))
{
    $ssrs_report->ToggleItem($_REQUEST[‘rs:ShowHideToggle’]);
}
else
{
    $ssrs_report->LoadReport2(REPORT, NULL);
}

Depending on how a report is designed, methods other than ToggleItem exist for rendering a report. For example, if your report allows a user to sort items, the Sort2 method is available. (For a complete list of methods on the SSRSReport class, see the SSRS SDK for PHP User Guide.htm file in the SDK.)

Note: In Reporting Services 2008, new functionality was introduced that required altering some methods. To maintain backwards compatibility with older Reporting Services releases, new methods were created (with the same name as their “old” counterparts) and post-fixed with “2”.

Render the Report as HTML

Next (and last), we render the report as HTML by creating a new RenderAsHTML object. (Other methods allow you to render a report as Excel, Word, CSV or Text, XML, Image, and PDF.)

$renderAsHTML = new RenderAsHTML();
$renderAsHTML->ReplacementRoot = getPageURL();
$result_html = $ssrs_report->Render2($renderAsHTML,
                                     PageCountModeEnum::$Estimate,
                                     $Extension,
                                     $MimeType,
                                     $Encoding,
                                     $Warnings,
                                     $StreamIds);

echo ‘<div style=’overflow:auto; width:1000px; height:700px’>’;
echo $result_html;
echo ‘</div>’;

Note the use of the ReplacementRoot property on the RenderAsHTML type: its value is used to replace all links in the generated report with relative links to the PHP page you are using. Here is the getPageURL function that returns the current page URL:

function getPageURL()
{
    $PageUrl = $_SERVER["HTTPS"] == "on"? ‘
https://’ : ‘http://’;
    $uri = $_SERVER["REQUEST_URI"];
    $index = strpos($uri, ‘?’);
    if($index !== false)
    {
         $uri = substr($uri, 0, $index);
    }
    $PageUrl .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . $uri;
    return $PageUrl;
}

Note: See this post for an example of rendering a report as an Excel document: http://blogs.msdn.com/b/brian_swan/archive/2010/09/23/rendering-sql-server-reports-as-excel-documents-with-php.aspx.

Really, that’s it…pretty simple. (Attached to this post is a file with the complete source code.) Of course, depending on the nature of your report, you might have to write a bit more code to handle postback events, but the basics are here. I think the Interoperability team did a great job in designing the SDK…it really makes consuming and displaying reports straightforward from PHP. To dig deeper into the capabilities of the SDK, read the docs that come with the download. Or, if you have questions, ask in a comment here and I’ll do some homework.

Thanks!

-Brian

Share this on Twitter

ssrs_demo.php

Comments (51)

  1. Paulo Pires says:

    Hi Brian!

    Thanks for this very useful information it helps a lot 🙂

    But i'm having a problem here with my application, i've done everything like you exemplified here but still having this problem with the collapse/expand functionality.

    The report its called and i'm able to collapse/expand the groups, but the +/- icon are asking the credentials to load, its like they are being retrieved from other connection. It wasn't suppose  to load the icons in the same connection that the report is being retrieved? Am I doing something wrong?

    Thanks in advance,

    Regards

  2. Brian Swan says:

    Hmmm…so the report renders, but you have to provide credentials to expand/collapse a category (and if you provide the PHPDemoUser credentials, you can expan/collapse a category). Do I have that right?

    I'm not sure this is relevant, but what authentication mode are you using for your website? (Anonymous? Windows?)

    -Brian

  3. Paulo Pires says:

    Yes the report renders, but it ask credentials just to load the -/+ icons. This is with a user that i create with a test environment that i've created.

    I've configured everything like the manual explain, so use "basic authentication".

    I've reported this issue to the SDK project to, they are investigating now this behavior.

    I've make a workaround on this problem, it appears that it calls a link to the +/- icons and that link are asking for the credentials to be given. So i replace that call with a call to a +/- signs of mine in the PHP file, so it no longer needs another credentials to be given. It works but its not straightforward, but I'll wait for the answer of the SSRS PHP SDK development team.

    Thankz

  4. SSRS problem in IE8 says:

    hello

    sorry for my English

    posted this question in the forum of microsoft and I did not have the answer to my question

    I try to use the SDK for SSRS php.

    but I could not progress because of this error:

     my report generator works on IE6

    but under IE8  I am asked a password and a user name

    I tried everything but nothing works

    What should I do?

    I use SSRS 2008.

    when I type the URL (http://ESI-933B4EF0C81:8080/Reports/Pages/Folder.aspx)

    in IE8.

     I get an image like this.

    (neumann.hec.ca/…/authentification.gif )

    I do not know what to put as password and username.

    knowing that I am using windows authentication in sql server 2008 for instance MSSQL.

    and I use an account for sql server instance SQLEXPRESS

    thank you and if you want further clarification you said to me

  5. Brian Swan says:

    That sounds like a permissions issue rather than a problem with the SDK. A couple of things you might try:

    1. Try running IE with Administrator privileges.
    2. Try changing the credentials under which your website's application pool is running.

    -Brian

  6. SSRS problem in IE8 says:

    Hello,

    RESOLVED

    so I managed to post the report in IE8

    I went to internet option and then IE6 security.

    I copied the titles that have been checked.

    then I installed IE8.

    I checked the same titles as those on IE6.

    then under IE8 I type the following URL (http://ESI-933B4EF0C81:8080/Reports/Pages/Folder.aspx).

    then right-click the yellow band and then I clicked on (enable intranet setting).

    thank's

  7. WAMP says:

    Hello,

    is it possible to work with the SDK under wamp.

    and if possible then how????

    thank's

  8. Brian Swan says:

    It isn't possible to use the SDK with WAMP – specifically not with MySQL. The SDK is designed to work with SQL Server Reporting Services (which is specific to SQL Server). However, I do know that some developers have linked a SQL Server instance to their MySQL database and then used SSRS to generate reports on the SQL Server data. A quick search will turn up lots of information about creating a linked server: http://www.bing.com/search?q=create+linked+server&form=QBRE&qs=n&sk=&sc=2-20.

    I hope that helps. Let me know if you have more questions.

    -Brian

  9. WAMP says:

    I already managed to connect to sql server wamp server.

    just uncomment this line (; = php_mssql.dll extension) in php.ini in wamp server

    I often wamp applications with SQL Server 2008 DB

    now the question is for the SDK + wamp???

    thank you

  10. WAMP says:

    if it is not possible with wamp sooffer me something else that IIS7.

    because I'm under xp version 2002.and with SQL Server 2008.

  11. Brian Swan says:

    Ah…I see. I usually think WAMP = Windows/Apache/MySQL/PHP. I didn't understand that you were using a SQL Server database.

    You should be able to create a report by following the steps in this post: blogs.msdn.com/…/getting-started-with-sql-server-reporting-services-ssrs.aspx. Then you can follow the steps in the post above to access reports. Give it a try and see how it goes.

    Note that the SDK does not depend on a database driver (like php_mssql.dll or php_sqlsrv.dll) – it accesses reports via the Report Server web service.

    -Brian

  12. WAMP says:

    you know I managed to view the reports.

    BI with SQL Server.

    but it hemstitch I try I can not manage with wamp.

    I get errors that appears.

    eg I am asked to add the ssrsreport.php

    in helloworld.php.

    so I copied all the file (bin) I added to my file (.. / helloworld / code)

    then I put it all in the folder (www) from wamp.

    I even turned to soap wamp server.

    I also change (app.config).

    I do not know what the problem is just credentials.

    then I do not know what to put in credentials

    if not maybe the problem lies elsewhere????

    because I do not know or have begun I will like to give me step by step with wamp

    thank you

  13. WAMP says:

    Hello,

    I followed the steps in your tutorial.

    I show you what I get.

    ////////////////////////////////////////////////////////////////

    SSRSReportException Object

    (

       [errorCode] =>

       [errorDescription] => Failed to connect to Reporting Service   Make sure that the url (http://esi-d01dc5a0500:8080/Reports/) and credentials are correct!

       [soapFault] =>

       [message:protected] =>

       [string:private] =>

       [code:protected] => 0

       [file:protected] => C:wampwwwCodeSSRSReport.php

       [line:protected] => 197

       [trace:private] => Array

           (

               [0] => Array

                   (

                       [file] => C:wampwwwCodetest.php

                       [line] => 12

                       [function] => SSRSReport

                       [class] => SSRSReport

                       [type] => ->

                       [args] => Array

                           (

                               [0] => Credentials Object

                                   (

                                       [_userName:private] =>

                                       [_password:private] =>

                                   )

                               [1] => http://esi-d01dc5a0500:8080/Reports

                           )

                   )

           )

    )

    ).

    ///////////////////////////////////////////////////

    is it possible to tell me why there's nothing that appears

    please also note that I did not create.

    and I go to sql server 2008 using windows authentication.

    thank's

  14. PHPDemoUser says:

    Hello,

    where and how you created the PHPDemoUser and password of PHPDemoUser ?

    Thank's

  15. PHPDemoUser says:

    Hello

    I run the SQL Server Management Studio.

    then I'm right on security.

    then new connection.

    in access name I typed (PHPDemoUser).

    then I typed the password.

    then I created a new user named (PHPDemoUser)in the db (AdventureWorks2008).

    and when I tried to add (PHPDemoUser) in the report generator get the following error (The name of the user or group 'PHPDemoUser' is not recognized. (rsUnknownUserName))

    thank you kindly respond

  16. PHPDemoUser says:

    éé oooh

    someone can help me

    Thank's

  17. tfkillzone says:

    Hey all,

    @PHPDemoUser, there are 2 parts to the SSRS security model that have to be addressed. The first provides access to the datasource, which you've done by creating the user in SSMS. This, of course, can be either a windows user or a sql user, whatever you prefer.

    The second part of the model is the report web server user. This must be either a domain account or a local machine account. So, for example, if you setup a local machine account called [server]PHPDemoUser, then that user will be available when you attempt to add PHPDemoUser to the report folder permissions. You have to setup both accounts in order to run the report. The first account provides access to the datasource, the second account provides access to the report itself. If you want to eliminate the need for the 2nd account, you will have to enable anonymous authentication, which is not recommended.

    I'm having issues with setting up a report using the SDK. I'm not quite sure how to properly pass ReportParameters to the report to be rendered. Here is a tidbit of code used in the PHP screen I'm building that calls our custom reporting class that is supposed to work with the SDK, with company name and urls censored in brackets of course :p


    require_once 'setup[company]Report.php'; $parameters = array(); $parameters[0] = new ReportParameter(); $parameters[0]->Name = "Paybat_Paybat_Id"; $parameters[0]->DefaultValues->Value = "PB0000000041"; echo $[company]Report->getReportHTML([reportPath], $parameters);

    And the following is the code for our class, [company]Report, which has a member function getReportHTML() that is used to render the report in HTML:


    <?php class [company]Report {    // TODO:  move this stuff to a config file    const UID = "phpuser";    const PWD = "Hpqzw0928";    const EXECUTION_URL = "[reportserverurl]/ReportExecution2005.asmx";    /** Will return an array containing the credentials for authorizing     *  access to the SSRS SOAP interface     *     * @return array credentials to be used when instantiating a new SoapClient     */    private function getCredentials()    {        return array('login' => "phpuser",                     'password' => "Hpqzw0928");    }    /** For a given report and a set of parameters, return the html string     *  to display the report within a web page.     * @param string $reportPath The full path name of the report.     * @param array $reportParameters parameters for the report     * @return string the html string to render the report     */    public function getReportHTML($reportPath, $reportParameters)    {        $client = new SoapClient(self::EXECUTION_URL, self::getCredentials());        $format = "HTML4.0";        $historyID = NULL;        $parameters = array('Report' => $reportPath,                            'HistoryID' => $historyID);        $stdObject = $client->LoadReport2($parameters);        $objectVars = get_object_vars ($stdObject);        // ok - we need to get the session id to call the Render2 web service        $executionInfo = $objectVars["executionInfo"]; if ($reportParameters) { $executionInfo->Parameters = $reportParameters; }        //^right here is where I thought I set the parameters, however...        $objectVars = get_object_vars ($executionInfo); //$executionInfo2 = $client->SetExecutionParameters2($reportParameters,"en-us"); //$objectVars = get_object_vars ($executionInfo2);        $header = new SoapHeader('<a rel="nofollow" target="_new" href="http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices'">schemas.microsoft.com/.../reportingservices&</a>,                                 'ExecutionHeader',                                 array('ExecutionID' => $objectVars["ExecutionID"])                                );        $client->__setSoapHeaders($header);        $deviceInfo = "<DeviceInfo><Toolbar>False</Toolbar><StreamRoot>images/</StreamRoot></DeviceInfo>";        $parameters = array ("Format" => "$format",                             "DeviceInfo" => $deviceInfo,                             "PaginationMode" => "Estimate"                            );        $stdObject = $client->Render2($parameters);        $objectVars = get_object_vars ($stdObject);        //^when this render is run, the report gives an error stating that the required parameter "Paybat_Paybat_Id", which I have given to the variable that I pass to this method, is not found.        $resultHTML = $objectVars["Result"];        $streamId = $objectVars["StreamIds"]; var_dump($streamId);        $streamIds = get_object_vars($streamId);        $parameters = array ("Format" => $format,                             "StreamID" => $streamIds["string"],                             "DeviceInfo" => $deviceInfo                            );        $stdObject = $client->RenderStream($parameters);        $objectVars = get_object_vars ($stdObject);        $result_img = $objectVars["Result"];        if (!$handle = fopen("images/" . $streamIds["string"] . ".jpg", 'wb'))        {            echo "Cannot open file for writing output";            exit;        }        if (fwrite($handle, $result_img) === FALSE)        {            echo "Cannot write to file";            exit;        }        fclose($handle);        return $resultHTML;    }    public function getReportPDF()    {        return "Not implemented yet";    } } ?>

    Any thoughts on how to pass the report parameters properly? What am I doing wrong?

  18. Brian Swan says:

    tfkillzone-

    I'm working on finding an answer to your question (don't have one immediately). While I continue to look at this, can you try setting the parameter value like this?

    $parameters[0]->Value = "PB0000000041";

    (Instead of like this: $parmaeters[0]->DefaultValues-Value = "PB0000000041";)

    Thanks.

    -Brian

  19. tfkillzone says:

    Thanks. I tried that, and it didn't change anything, but I'm assuming you know that there's something else up anyways lol. Sorry I didn't post this before but I thought that last post was getting too long. Here's the exact error I get:

    ~~~

    Fatal error: Uncaught SoapFault exception: [soap:Client] System.Web.Services.Protocols.SoapException: This report requires a default or user-defined value for the report parameter 'Paybat_Paybat_Id'. To run or subscribe to this report, you must provide a parameter value. —> Microsoft.ReportingServices.Diagnostics.Utilities.ReportParameterValueNotSetException: This report requires a default or user-defined value for the report parameter 'Paybat_Paybat_Id'. To run or subscribe to this report, you must provide a parameter value. at Microsoft.ReportingServices.WebServer.ReportExecution2005Impl.InternalRender(String Format, String DeviceInfo, PageCountMode pageCountMode, Stream& Result, String& Extension, String& MimeType, String& Encoding, Warning[]& Warnings, String[]& StreamIds) at Microsoft.ReportingServices.WebServer.ReportExecution2005Impl.Render(String Format, String DeviceInfo, PageCountMode pageCountMode, Byte[]& Result, String& Extension, String& MimeType, String& Encoding, Warning[]& Warnings, String[]& Stre in [PHPdirectory][company]Report.php on line 84

  20. Brian Swan says:

    tfkillzone-

    Sorry for the slow response, but I think I'm onto the problem. In the documentation that ships with the SDK, this is what is shown for working with parameters:

       $parameters = array();

       $parameters[0] = new ParameterValue();

       $parameters[0]->Name = "EmployeeID";

       $parameters[0]->Value = "283";

    Note the type difference between this and your code (ParameterValue vs. ReportParameter). Also look at the GetReports.php sample in the SSRSReportSamplesHelloWorldCode directory of the SDK download package.

    Let me know if that helps.

    Thanks.

    -Brian

  21. tfkillzone says:

    Yes, that was the problem, thank you. That, and also I was trying to manually set the parameters when I needed to be using the "SetExecutionParameters2" function. Thanks for the help.

  22. blaize says:

    Thanks for this tutorial.

    is it possible to share a report that was created.because when I submit. reports can be found in the file (reports).but me since I have a website and I wish anyone connecting to my website can take the reports that I create and file.

    Thanks

  23. Brian Swan says:

    @blaize-

    Access the reports is granted or denied based on the credentials you use in your script (UID and PWD). If those credentials are valid, then anyone accessing your script should be able to see the reports. If you need some more information about setting up permissions, this tutorial might help: msdn.microsoft.com/…/aa337491.aspx.

    Hope that helps.

    -Brian

  24. blaize says:

    HI,

    yes I use UID AND PWD.

    I noticed that you can see what is inside the folder Reports so everyone can download the reports.

    but the link that you have to spend on reporting services and not the SDK not.

    because that is one app.conf.

    or he must create several app.conf for each person?.

    because me what I want for example:

    Person A can see and download the reports (A and B).

    the peronne B can see and download the reports (C and D).

    THX

  25. blaize says:

    HI,

    by clicking submit and having fixed HTML4.0 export format.

    I get the result of my report but with an error which is below:

    PHP Notice: Undefined index: REQUEST in C: InetpubwwwrootPHP  GetReports.php-line 292

    I work with   IIS5 and SQL Server 2008

    I have another question is it possible to make an IMPORT with the SDK.

    THANK YOU

  26. blaize says:

    hi,

    I ran the (ssrs_demo.php) of your tutorial.

    and I get a report with this error below

    PHP Notice: Undefined index: REQUEST_URI in C:InetpubwwwrootPHPWorkSpaceConsume_SSRS_Reportssrs_demo.php on line 47

    please help me

    thanks

  27. Brian Swan says:

    @blaize-

    I'm not sure why REQUEST_URI would be an undefined index. It is listed as a supported index here: http://www.php.net/…/reserved.variables.server.php. I'd suggest looking further at what information actually is in $_SERVER (print_r($_SERVER)) to start figuring out what the problem might be.

    -Brian

  28. blaize says:

    I have not managed to solve my problem.

    plus I did not understand this line "$ _SERVER (print_r ($ _SERVER)).

    I do not know where to put in the code ssrs_demo.php.

    I have another question and I took you to answer me. it's been days since I galley with this problem.

    I managed to run (helloworld.php).

    but with the previous error below.

    my problem is the next step.

    I work with (getreport.php).

    1. I click on a report.
    2. I submit (EXPORT FORMAT IS FIXED to HTML4.0).

    3. I get the report in html.

    4. I submit (Export  FORMAT IS FIXED to PDF ).

    5. I get the report in PDF.

    but without doing anything I do any configuration.

    the problem is that sometimes it works but sometimes it does not work.

    so my question is that after completing the helloworld.php I must to do something or the other (getreport.php) is sufficient to run the SDK.??????????

  29. Santiago Porras says:

    How can I work with multivalue parameters? I'm trying it but I don't get a solution.

  30. Santy says:

    @blaize, you must write print_r($_SERVER) to view all parameters from $_SERVER

  31. blaize says:

    @santy,

    write print_r ($ _SERVER) ok but where.

    I use ssrs_demo.php of this tutorial.

    Please a little clarification.

    thanks

  32. spardam4 says:

    hello I want to use this solution, but I have SQL Server 2005, Could be possible to use that data base version?

  33. Brian Swan says:

    @spardam4-

    I *think* this SDK only works with SQL Server 2008 and later. I'll let you know when I've confirmed that.

    Thanks.

    -Brian

    Edit…more info: The SSRS SDK for PHP has not been tested against SQL Server 2005. If the Reporting Services API is the same in SQL Server 2005 and 2008, you should be able to use it (although I think the API has changed).

    Hope that helps.

  34. spardam4 says:

    @Brian Swan: Thanks a lot 🙂

  35. amjed says:

    Hi Brian!

    i do the steps in two files in package client setup and server setup but it give me after that internal error when execute in browser

    can you help me with detailed steps you done to run this package

    please i very need this package that solve my problem

    i wait for reply>>>

    please i need help

  36. amjed says:

    thank for reply

    these steps is for setup reporting services sample report and database northwind sample database but i want after that what steps to show report with ssrs sdk for php i try steps in manual in package and not run please

    give me steps you do and show version of iis and php and if other steps required program give me version of it.

    other question:

    i run with window 7 , IIS 7.5 and reporting services developer edition

    please i want this steps in detailed

    i try steps in manual 5 times and all fail >

    thank you for reply

  37. amjedns2 says:

    @Brian

    i would to ask you question:

    did ssrs sdk for php run under IIS7 only or run under any version of IIS

    i try it under IIS 7.5

    did the different between version give errors

    this is first question?

    the second question :

    did the wamp server can run this package because my project hosting under wamp server?

    i become very happy if listen answer from you

    thank you

    amjed

  38. amjed says:

    Hello Brian:

    i follow the steps in client_step.html

    i steps in your website i give this error

    SSRSReportException Object

    (

       [errorCode] =>

       [errorDescription] => Failed to connect to Reporting Service   Make sure that the url (http://localhost/ReportServer/) and credentials are correct!

       [soapFault] =>

       [message:protected] =>

       [string:private] =>

       [code:protected] => 0

       [file:protected] => C:PATH_TOSSRSReportSamplesHelloWorldCodeSSRSReport.php

       [line:protected] => 197

       [trace:private] => Array

           (

               [0] => Array

                   (

                       [file] => C:PATH_TOSSRSReportSamplesHelloWorldCodessrs_demo.php

                       [line] => 12

                       [function] => SSRSReport

                       [class] => SSRSReport

                       [type] => ->

                       [args] => Array

                           (

                               [0] => Credentials Object

                                   (

                                       [_userName:private] => MYMACHINEPHPDemoUser

                                       [_password:private] => mypassword

                                   )

                               [1] => http://localhost/ReportServer/

                           )

                   )

           )

    )

    i understand this step:

    Create a login on your SQL Server Express installation for PHPDemoUser. When you create this login you'll want to qualify it with your machine name: MACHINE_NAMEPHPDemoUser.

    i do steps in this website to create login on my sql server for PHPDemoUser

    the link:

    http://www.c-sharpcorner.com/…/3594

    and then give this error

    please help me about this error

    i wait you>

  39. Brian Swan says:

    @amjed-

    It sounds like the trouble you are having is with setting up permissions to the report server and/or to the database, not an IIS issue (the SDK should work fine with IIS 7.5). I'd suggest you ask for help with permissions in the SQL Server Reporting Services forum: social.msdn.microsoft.com/…/threads.

    Hope that helps.

    -Brian

  40. amjed says:

    @brian

    i am sorry for noise you with my problem

    the permission of reporting services i know :

    I set PHPDemoUser in report manager to folder security property

    then you can access repoting server

    if i login with PHPDemoUser i show the report server and report manager

    and i also add  <RSWindowsBasic/> in report server config file

    you say in this article after do prequisites section of create user with right permisions

    i create step 1

    i open sql server management studio

    -> login to database engine

    -> click right click of server and choose properties

    -> choose security property and click sql server and windows authentication mode

    -> go to security ->logins and create phpDemoUser as sql server authentication

    and enter password

    -> add PHPDemoUser to northwind and reportServer database

    and give db_datareader and db_datawriter

    -> i run browser internet explorer with url http://localhost:50003/ssrs_demo.php

    and give me the error i mentioned in last post

    what is the problem did any steps i cannot do !

    please help me?

    thanks

  41. JP says:

    will this work on SSRS 2005?

  42. Brian Swan says:

    @JP

    The SDK has not been tested against SSRS 2005 (and I haven't tried it either). That said, compatability depends on the SOAP API for SSRS. My understanding is that there have been minor changes in the SOAP API. You might find that the SDK mostly "just works" for SSRS 2005, but some methods do not. (Again, I haven't tried myself…need to add this to my TODO list.)

    -Brian

  43. swninetails says:

    Thank you! Thank you! Thank you!!

  44. Hans says:

    Can I connect from another workstation to the SQL server or need the api code to be on de SQL station? I try to connect from my local XAMPP sandbox to the SQL server in the same network.

  45. marcus winckers says:

    Need some help on ssrsphp and would appreciate it if you could set me on the right track.

    We are looking to integrate SSRS reports into DRUPAL by ssrsphp. For simple reports i have it now working like a charm.

    But we also have lots of reports that use the Toggle to hide /show  datafragments.

    If i render the report using ssrsphp  I get no + -icons or toggle functionality.

    If i render using url: ../reportserver/…, i get +icons and functionality like normal.

    How or where do i use/set  the &rs:ShowHideToggle parameter?

    (I can supply you with name of the report and us/passw to the server , so that you can test your own ssrsphh..)

    Looking forward to hear from you

    (or perhaps you can  contact us with someone who could assist  us with this project)

    Marcus Winckers

    webmaster junior http://www.nivel.nl ( we use a lot of ssrs tables and grafs)

  46. Micah says:

    I have SSRS running on SQL 2008r2; I've added RSWindowsBasic as an authentication method, created a local user, and added that user in SQL to the appropriate tables as suggested by your video: http://www.youtube.com/watch

    I have had no luck getting this to work… it prompts for the login but never authenticates. What am I missing here?

    All help greatly appreciated

  47. Rajan says:

    Brian,

    This is a great article, any library to integrate SSRS with Java?

    Thanks,

    Rajan

  48. Jabrane says:

    Hello, Good job

    I have a question, can i give to multiuser the access to my ssrs reports in php file

    i means in this line of source code how can i use a array of user to acces to my report

    new SSRSReport(new Credentials($settings["UID"], $settings["PASWD"]),$settings["SERVICE_URL"]);

    Thank you very much for the reply

  49. halima says:

    hello, i need ton know how can'i use reporting service en php plz