PHP code example of chriskl / phpssrs

1. Go to this page and download the library: Download chriskl/phpssrs library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

chriskl / phpssrs example snippets



use \PhpSsrs\ReportingService2010\ReportingService2010;
use \PhpSsrs\ReportingService2010\CreateFolder;

// Replace WSDL URL with your URL, or even better a locally saved version of the file.
$rs = new ReportingService2010([
    'soap_version' => SOAP_1_2,
    'compression' => true,
    'exceptions' => true,
    'cache_wsdl' => WSDL_CACHE_BOTH,
    'keep_alive' => true,
    'features' => SOAP_SINGLE_ELEMENT_ARRAYS & SOAP_USE_XSI_ARRAY_TYPE,
    'login' => 'DOMAIN\\samaccountname',
    'password' => '###########'
], 'http://<ssrs server>/ReportServer/ReportService2010.asmx?wsdl');

$request = new CreateFolder('Test Folder', '/', []);
$response = $this->rs->CreateFolder($request);