summaryrefslogtreecommitdiffstats
path: root/samples/ListRenderingExtensions.php
diff options
context:
space:
mode:
Diffstat (limited to 'samples/ListRenderingExtensions.php')
-rwxr-xr-xsamples/ListRenderingExtensions.php57
1 files changed, 25 insertions, 32 deletions
diff --git a/samples/ListRenderingExtensions.php b/samples/ListRenderingExtensions.php
index 0f17f2a..5b3bf91 100755
--- a/samples/ListRenderingExtensions.php
+++ b/samples/ListRenderingExtensions.php
@@ -1,40 +1,33 @@
<?php
+
require('../library/SSRS/Report.php');
-try {
- $options = array(
- 'username' => 'testing',
- 'password' => 'password'
- );
+$options = array(
+ 'username' => 'testing',
+ 'password' => 'password'
+);
+
+$ssrs = new SSRS_Report('http://localhost/reportserver/', $options);
+$results = $ssrs->listRenderingExtensions();
- $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 '<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 '<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>';
- 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>';
-
-} catch (Exception $error) {
- echo 'Exception:' . PHP_EOL;
- print_r($error);
-
}
-?> \ No newline at end of file
+echo '</table>'; \ No newline at end of file