diff options
Diffstat (limited to 'samples/LoadReport.php')
-rwxr-xr-x | samples/LoadReport.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/samples/LoadReport.php b/samples/LoadReport.php new file mode 100755 index 0000000..c33c3af --- /dev/null +++ b/samples/LoadReport.php @@ -0,0 +1,23 @@ +<?php +require('../library/SSRS/Report.php'); + +try { + $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); + $ssrs->setExecutionParameters(new SSRS_Object_ExecutionParameters($result->executionInfo->Parameters)); + + $output = $ssrs->render('HTML4.0'); // PDF | XML | CSV + echo $output; +} catch (Exception $error) { + echo 'Exception:' . PHP_EOL; + print_r($error); + +} +?> |