summaryrefslogtreecommitdiffstats
path: root/samples/ListChildren.php
diff options
context:
space:
mode:
Diffstat (limited to 'samples/ListChildren.php')
-rwxr-xr-xsamples/ListChildren.php27
1 files changed, 10 insertions, 17 deletions
diff --git a/samples/ListChildren.php b/samples/ListChildren.php
index eca797c..513e7a2 100755
--- a/samples/ListChildren.php
+++ b/samples/ListChildren.php
@@ -1,22 +1,15 @@
<?php
-require(dirname(__FILE__) . '/../library/SSRS/Report.php');
-
-try {
- $options = array(
- 'username' => 'testing',
- 'password' => 'password',
- );
- $ssrs = new SSRS_Report('http://localhost/reportserver/', $options);
- $result = $ssrs->listChildren('/Reports', true);
+require(dirname(__FILE__) . '/../library/SSRS/Report.php');
-// print_r($result);
+$options = array(
+ 'username' => 'testing',
+ 'password' => 'password',
+);
- foreach($result->CatalogItems AS $item){
- echo $item->Name . ': ' . $item->Path . PHP_EOL;
- }
+$ssrs = new SSRS_Report('http://localhost/reportserver/', $options);
+$result = $ssrs->listChildren('/Reports', true);
-} catch (Exception $error) {
- echo 'Exception:' . PHP_EOL;
- print_r($error);
-}
+foreach ($result->CatalogItems AS $item) {
+ echo $item->Name . ': ' . $item->Path . PHP_EOL;
+} \ No newline at end of file