The Inx_Api_Reporting_ReportEngine is used to generate reports.
The Inx_Api_Reporting_ReportEngine is used to generate reports. To generate a report, you first need to create an Inx_Api_Reporting_ReportRequest which contains the relevant information needed to generate the report:
The following snippet shows how to download the report 'SystemDomainDistribution' as PDF report in the German locale and time zone with a limit of 20 entries and save it to the file 'SystemDomainDistribution.pdf':
$oReportRequest = new Inx_Api_Reporting_ReportRequest( "SystemDomainDistribution", Inx_Api_Reporting_ReportRequest::OUTPUT_FORMAT_PDF_A4, "de_DE", "Europe/Berlin" ); $oReportRequest->putParameter( "limit", "20" ); $oReportEngine = $oSession->getReportEngine(); $oReportTicket = $oReportEngine->generate( $oReportRequest, false ); $oResult = $oReportTicket->fetchDownloadableResult(); while( $oResult == null ) { sleep( 3 ); $oResult = $oReportTicket->fetchDownloadableResult(); } $sOutputFile = "SystemDomainDistribution.pdf"; download( $oResult->getInputStream(), $sOutputFile ); if( $oReportTicket != null ) { $oReportTicket->close(); }
The download() method - which is not part of the API - may be used to save the report to a file on disk. The following snippet shows the definition of the download() method:
function download($inputStream, $sFileName) { $handle = fopen($sFileName, 'w+b'); while (($ch = $inputStream->read()) != -1) { fwrite($handle, $ch); } $inputStream->close(); fclose($handle); }
Please note: some reports require you to specify the type of the mailing for which the report is built. To specify this mailing type, use the Inx_Api_Reporting_ReportRequest::putMailingTypeParameter($sKey, $oMailingType) method which accepts Inx_Api_Reporting_ReportMailingTypes.
For a complete list of the available reports and the properties associated with them, see Appendix A of the API developer guide.
Located in /Api/Reporting/ReportEngine.php (line 85)
This method is used to initiate the generation of the report specified by the given Inx_Api_Reporting_ReportRequest.
This method is used to initiate the generation of the report specified by the given Inx_Api_Reporting_ReportRequest. The returned Inx_Api_Reporting_ReportTicket may be used to poll for the Inx_Api_Reporting_DownloadableResult used to download the generated report. For an example on how to do this, see the documentation of this class.
Returns the localized Inx_Api_Reporting_ConfigDescriptor of the specified report.
Returns the localized Inx_Api_Reporting_ConfigDescriptor of the specified report. The ConfigDescriptor describes the structure and elements of the report configuration area. A ConfigDescriptor contains a set of Inx_Api_Reporting_ControlUnits which in turn contain a set of Inx_Api_Reporting_Controls. A Control describes a configuration element like the list or mailing chooser.
Returns all names of the default and custom report types.
Returns all names of the default and custom report types.
Returns all supported time zones.
Returns all supported time zones.
Documentation generated on Thu, 17 Sep 2015 14:27:29 +0200 by phpDocumentor 1.3.2