Use the Inx_Api_Reporting_DownloadableResult to download a generated report.
Use the Inx_Api_Reporting_DownloadableResult to download a generated report. A DownloadableResult can be obtained using Inx_Api_Reporting_ReportTicket::fetchDownloadableResult(). The report ticket is returned by Inx_Api_Reporting_ReportEngine::generate($oRequest, $blIgnoreCache). As the report generation is an asynchronous process, the DownloadableResult must be polled. Inx_Api_Reporting_ReportTicket::fetchDownloadableResult() will return null as long as the report generation has not finished. <p/> The following snippet shows how to download a report using the DownloadableResult:
$oResult = $oReportTicket->fetchDownloadableResult(); while( $oResult == null ) { sleep( 3 ); $oResult = $oReportTicket->fetchDownloadableResult(); } $sOutputFile = "SystemDomainDistribution.pdf"; download( $oResult->getInputStream(), $sOutputFile ); if( $oReportTicket != null ) { $oReportTicket->close(); }<p/> Some output formats (e.g.
function download($inputStream, $sFileName) { $handle = fopen($sFileName, 'w+b'); while (($ch = $inputStream->read()) != -1) { fwrite($handle, $ch); } $inputStream->close(); fclose($handle); }<p/> For a more complete example on how to generate and download reports, see the Inx_Api_Reporting_ReportEngine documentation.
Located in /Api/Reporting/DownloadableResult.php (line 63)
This method returns the content type of the data in the form of a string.
This method returns the content type of the data in the form of a string. <p/> It always returns one of the following types:
Returns the creation date of this report.
Returns the creation date of this report. The date will be returned as ISO-8601 formatted datetime string.
Returns an Inx_Api_InputStream which can be used to download the report.
Returns an Inx_Api_InputStream which can be used to download the report.
Documentation generated on Thu, 17 Sep 2015 14:27:24 +0200 by phpDocumentor 1.3.2