Example #1
0
 /**
  * Processes a specific report and renders it in the specified format.
  * @param RenderBaseType $renderType Object holding Format and DeviceInfo.
  * @param string $Extension [out] The file extension corresponding to the
  *                                                          output stream.
  * @param string $MimeType [out] The MIME type of the rendered report
  * @param string $Encoding [out] The encoding used when report server
  *                                  renders the contents of the report.
  * @param string $Warnings [out] An array of  Warning objects that
  *                                  describes any warnings that occurred
  *                                  during report processing.
  * @param StreamIdCollection $StreamIds.
  * @return byte[] A byte array of the report in the specified format.
  */
 public function Render2($renderType, $PaginationMode, &$Extension, &$MimeType, &$Encoding, &$Warnings, &$StreamIds)
 {
     if ($renderType instanceof RenderAsHTML && isset($renderType->ReplacementRoot)) {
         $renderType->ReplacementRoot .= strpos($renderType->ReplacementRoot, '?') !== false ? '&' : '?amp;';
         $renderType->ReplacementRoot .= 'ps%3aSessionID=' . $this->ExecutionInfo2->ExecutionID . '&ps%3aOrginalUri=';
     }
     $parameters = array("Format" => $renderType->GetFormat(), "DeviceInfo" => $renderType->GetDevInfoXML(), "PaginationMode" => $PaginationMode);
     try {
         $this->SetSessionId();
         $stdObject = $this->_soapHandle_Exe->Render2($parameters);
         $renderResponse = SSRSTypeFactory::CreateSSRSObject('RenderResponse', $stdObject);
         $Extension = $renderResponse->Extension;
         $MimeType = $renderResponse->MimeType;
         $Encoding = $renderResponse->Encoding;
         $Warnings = $renderResponse->Warnings;
         $StreamIds = $renderResponse->StreamIds->string;
         return $renderResponse->Result;
     } catch (SoapFault $soapFault) {
         self::ThrowReportException($soapFault);
     }
 }