diff options
author | jaysmith6811@gmail.com <jaysmith6811@gmail.com@deae1e92-32f9-c189-e222-5b9b5081a27a> | 2012-09-27 08:43:50 +0000 |
---|---|---|
committer | jaysmith6811@gmail.com <jaysmith6811@gmail.com@deae1e92-32f9-c189-e222-5b9b5081a27a> | 2012-09-27 08:43:50 +0000 |
commit | 7b918b07e5285cc752caf93f0558766bb24b6637 (patch) | |
tree | a44e65e0150e475faeed840c435fc29d54205e52 /library | |
parent | e5402b28c9a3f22030f40a4fa179a3bcf6480b7c (diff) | |
download | php-ssrs-7b918b07e5285cc752caf93f0558766bb24b6637.zip php-ssrs-7b918b07e5285cc752caf93f0558766bb24b6637.tar.gz php-ssrs-7b918b07e5285cc752caf93f0558766bb24b6637.tar.bz2 |
added stream rendering
Diffstat (limited to 'library')
-rwxr-xr-x | library/SSRS/Object/RenderStream.php | 22 | ||||
-rwxr-xr-x | library/SSRS/Report.php | 25 |
2 files changed, 45 insertions, 2 deletions
diff --git a/library/SSRS/Object/RenderStream.php b/library/SSRS/Object/RenderStream.php new file mode 100755 index 0000000..a1027f8 --- /dev/null +++ b/library/SSRS/Object/RenderStream.php @@ -0,0 +1,22 @@ +<?php + +/** + * SSRS_Object_RenderStream + * + * @author arron + */ +class SSRS_Object_RenderStream extends SSRS_Object_Abstract { + + public $Result; + public $MimeType; + + public function __construct(stdClass $stream) { + $this->Result = $stream->Result; + $this->MimeType = $stream->MimeType; + } + + public function __toString() { + return $this->Result; + } + +}
\ No newline at end of file diff --git a/library/SSRS/Report.php b/library/SSRS/Report.php index 97a3362..a9b2f3a 100755 --- a/library/SSRS/Report.php +++ b/library/SSRS/Report.php @@ -258,13 +258,13 @@ class SSRS_Report { $result = $this->getSoapExecution()->LoadReport($params); return new SSRS_Object_ExecutionInfo($result); } - + /** * Get current execution info * * @return \SSRS_Object_ExecutionInfo */ - public function getExecutionInfo(){ + public function getExecutionInfo() { $result = $this->getSoapExecution()->GetExecutionInfo2(); return new SSRS_Object_ExecutionInfo($result); } @@ -312,6 +312,27 @@ class SSRS_Report { } /** + * + * @param string $format + * @param string $streamId + * @param array $deviceInfo + * @return \SSRS_Object_RenderStream + */ + public function renderStream($format, $streamId, $deviceInfo = array()) { + $this->checkSessionId(); + $deviceInfo = array('DeviceInfo' => array_merge(array('Toolbar' => 'false'), $deviceInfo)); + + $renderParams = array( + 'Format' => $format, + 'StreamID' => $streamId, + 'DeviceInfo' => $this->renderDeviceInfo($deviceInfo), + ); + + $result = $this->getSoapExecution()->RenderStream($renderParams); + return new SSRS_Object_RenderStream($result); + } + + /** * Checks if there is a valid Session ID set. * */ |