summaryrefslogtreecommitdiffstats
path: root/library/SSRS/Object
diff options
context:
space:
mode:
Diffstat (limited to 'library/SSRS/Object')
-rwxr-xr-xlibrary/SSRS/Object/ExecutionInfo.php34
-rwxr-xr-xlibrary/SSRS/Object/ReportOutput.php8
-rwxr-xr-xlibrary/SSRS/Object/ReportParameter.php24
3 files changed, 65 insertions, 1 deletions
diff --git a/library/SSRS/Object/ExecutionInfo.php b/library/SSRS/Object/ExecutionInfo.php
index 0a723db..f1f9d56 100755
--- a/library/SSRS/Object/ExecutionInfo.php
+++ b/library/SSRS/Object/ExecutionInfo.php
@@ -84,6 +84,40 @@ class ExecutionInfo extends ObjectAbstract {
return null;
}
+ public function hasOutstandingDependencies() {
+ $parameters = $this->getReportParameters();
+ foreach ($parameters AS $parameter) {
+ if ($parameter->hasOutstandingDependencies()) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ public function hasMissingValidValues() {
+ $parameters = $this->getReportParameters();
+ foreach ($parameters AS $parameter) {
+ if ($parameter->hasMissingValidValue()) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ public function canRender() {
+ if ($this->hasOutstandingDependencies()) {
+ return false;
+ }
+
+ if ($this->hasMissingValidValues()) {
+ return false;
+ }
+
+ return true;
+ }
+
public function __sleep() {
$this->executionInfo = null;
return array('data');
diff --git a/library/SSRS/Object/ReportOutput.php b/library/SSRS/Object/ReportOutput.php
index ac17fe4..70d7928 100755
--- a/library/SSRS/Object/ReportOutput.php
+++ b/library/SSRS/Object/ReportOutput.php
@@ -11,7 +11,9 @@ class ReportOutput extends ObjectAbstract {
$this->verifyCachePath($localCachePath);
$rootPath = rtrim($localCachePath, '/');
- foreach ($this->StreamIds->string as $streamId) {
+
+ $streamIds = $this->getStreamIds();
+ foreach ($streamIds as $streamId) {
$path = $rootPath . '/' . $streamId;
$stream = $report->renderStream($format, $streamId);
@@ -22,6 +24,10 @@ class ReportOutput extends ObjectAbstract {
return $this;
}
+ public function getStreamIds() {
+ return is_array($this->StreamIds->string) ? $this->StreamIds->string : array($this->StreamIds->string);
+ }
+
public function download($filename) {
header("Cache-control: max-age=3600, must-revalidate");
header("Pragma: public");
diff --git a/library/SSRS/Object/ReportParameter.php b/library/SSRS/Object/ReportParameter.php
index 60a09a2..d00e464 100755
--- a/library/SSRS/Object/ReportParameter.php
+++ b/library/SSRS/Object/ReportParameter.php
@@ -95,11 +95,27 @@ class ReportParameter extends ObjectAbstract {
*
* @return bool
*/
+ public function hasMissingValidValue() {
+ return ($this->getState() == 'MissingValidValue');
+ }
+
+ /**
+ *
+ * @return bool
+ */
public function getState() {
return key_exists('State', $this->data) ? $this->data['State'] : null;
}
/**
+ *
+ * @return string
+ */
+ public function getType() {
+ return $this->data['Type'];
+ }
+
+ /**
*
* @return bool
*/
@@ -115,4 +131,12 @@ class ReportParameter extends ObjectAbstract {
return ($this->isMultiValue() || (!empty($this->data['ValidValues']) && is_array($this->data['ValidValues']) && count($this->data['ValidValues']) > 0));
}
+ /**
+ *
+ * @return bool
+ */
+ public function isAllowBlank() {
+ return $this->data['AllowBlank'];
+ }
+
}