public function exportCachedReportAction($requestId, $format) {
        //Get the export data
        $export = $this->container->get('mesd.jasper.report.loader')->getReportLoader()->getCachedReport($requestId, $format);

        //Create the response
        $response = new Response();

        //Set the headers
        if (self::FORMAT_PDF === $format) {
            $response->headers->set('Content-Type', 'application/pdf');
        }
        $response->headers->set('Content-Disposition', 'attachment;filename="' . $export->getUri() . '.' . $format . '"');
        $response->headers->set('Content-Transfer-Encoding', 'binary');
        $response->headers->set('Pragma', 'no-cache');
        $response->headers->set('Expires', '0');

        //Set the content of the response
        $response->setContent($export->getOutput());

        //Return the final response
        return $response;
    }
public function exportCachedReportAction($requestId, $format) {
        //Get the export data
        $export = $this->container->get('mesd.jasper.report.loader')->getReportLoader()->getCachedReport($requestId, $format);

        //Create the response
        $response = new Response();

        //Set the headers
        if (self::FORMAT_PDF === $format) {
            $response->headers->set('Content-Type', 'application/pdf');
        }
        $response->headers->set('Content-Disposition', 'attachment;filename="' . $export->getUri() . '.' . $format . '"');
        $response->headers->set('Content-Transfer-Encoding', 'binary');
        $response->headers->set('Pragma', 'no-cache');
        $response->headers->set('Expires', '0');

        //Set the content of the response
        $response->setContent($export->getOutput());

        //Return the final response
        return $response;
    }
public function exportCachedReportAction ( $ requestId , $ format ) { //Get the export data $ export = $ this -> container -> get ( 'mesd.jasper.report.loader' ) -> getReportLoader ( ) -> getCachedReport ( $ requestId , $ format ) ; //Create the response $ response = new Response ( ) ; //Set the headers if ( self :: FORMAT_PDF === $ format ) { $ response -> headers -> set ( 'Content-Type' , 'application/pdf' ) ; } $ response -> headers -> set ( 'Content-Disposition' , 'attachment;filename="' . $ export -> getUri ( ) . '.' . $ format . '"' ) ; $ response -> headers -> set ( 'Content-Transfer-Encoding' , 'binary' ) ; $ response -> headers -> set ( 'Pragma' , 'no-cache' ) ; $ response -> headers -> set ( 'Expires' , '0' ) ; //Set the content of the response $ response -> setContent ( $ export -> getOutput ( ) ) ; //Return the final response return $ response ; }
Serves report exports

@param  string $requestId The request id of the report to export
@param  string $format    The format of the report to return

@return Response          The exported report
Serves report exports