diff options
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. * */ |