示例#1
0
<?php

require __DIR__ . '/../vendor/autoload.php';
$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);
$output = $ssrs->render('HTML4.0');
// PDF | XML | CSV
echo $output;
示例#2
0
<?php

require __DIR__ . '/../vendor/autoload.php';
$options = array('username' => 'testing', 'password' => 'password');
$ssrs = new \SSRS\Report('http://localhost/reportserver/', $options);
$result = $ssrs->listChildren('/Reports', true);
foreach ($result->CatalogItems as $item) {
    echo $item->Name . ': ' . $item->Path . PHP_EOL;
}
<?php

require __DIR__ . '/../vendor/autoload.php';
$options = array('username' => 'testing', 'password' => 'password');
$ssrs = new \SSRS\Report('http://localhost/reportserver/', $options);
$ItemPath = '/Reports/Reference_Report';
$result = $ssrs->getItemDefinition($ItemPath);
header('Content-Type:text/xml');
echo $result;
<?php

require __DIR__ . '/../vendor/autoload.php';
$options = array('username' => 'testing', 'password' => 'password');
$ssrs = new \SSRS\Report('http://localhost/reportserver/', $options);
$results = $ssrs->listRenderingExtensions();
echo '<table border="1" width="100%">';
echo '<tr>';
echo '<th>ExtensionType</th>';
echo '<th>Name</th>';
echo '<th>LocalisedName</th>';
echo '<th>Visible</th>';
echo '<th>IsModelGenerationSupported</th>';
echo '</tr>';
foreach ($results->Extensions->Extension as $extension) {
    $extension->Visible = empty($extension->Visible) ? "Null" : $extension->Visible;
    $extension->IsModelGenerationSupported = empty($extension->IsModelGenerationSupported) ? "Null" : $extension->IsModelGenerationSupported;
    echo '<tr>';
    echo '<td>' . $extension->ExtensionType . '</td>';
    echo '<td>' . $extension->Name . '</td>';
    echo '<td>' . $extension->LocalizedName . '</td>';
    echo '<td>' . $extension->Visible . '</td>';
    echo '<td>' . $extension->IsModelGenerationSupported . '</td>';
    echo '</tr>';
}
echo '</table>';