protected function loadPage($requestId, $page) {
        //Create an array that will be converted into the json response
        $response = array('success' => true, 'output' => '');

        //Load the report
        $rl = $this->container->get('mesd.jasper.report.loader')->getReportLoader();
        try {
            $report = $rl->getCachedReport($requestId, 'html', array('page' => $page));
        } catch(\Exception $e) {
            $response['success'] = false;
            $response['output'] = 'An error occured trying to load the report';
            $response['totalPages'] = 0;
            $response['page'] = 0;
        }

        if ($response['success']) {
            $response['success'] = !$report->getError();
            $response['output'] = $report->getOutput();
            $response['totalPages'] = $report->getTotalPages();
            $response['page'] = $report->getPage();
        }

        //return the response array
        return $response;
    }
protected function loadPage($requestId, $page) {
        //Create an array that will be converted into the json response
        $response = array('success' => true, 'output' => '');

        //Load the report
        $rl = $this->container->get('mesd.jasper.report.loader')->getReportLoader();
        try {
            $report = $rl->getCachedReport($requestId, 'html', array('page' => $page));
        } catch(\Exception $e) {
            $response['success'] = false;
            $response['output'] = 'An error occured trying to load the report';
            $response['totalPages'] = 0;
            $response['page'] = 0;
        }

        if ($response['success']) {
            $response['success'] = !$report->getError();
            $response['output'] = $report->getOutput();
            $response['totalPages'] = $report->getTotalPages();
            $response['page'] = $report->getPage();
        }

        //return the response array
        return $response;
    }
protected function loadPage ( $ requestId , $ page ) { //Create an array that will be converted into the json response $ response = array ( 'success' => true , 'output' => '' ) ; //Load the report $ rl = $ this -> container -> get ( 'mesd.jasper.report.loader' ) -> getReportLoader ( ) ; try { $ report = $ rl -> getCachedReport ( $ requestId , 'html' , array ( 'page' => $ page ) ) ; } catch ( \ Exception $ e ) { $ response [ 'success' ] = false ; $ response [ 'output' ] = 'An error occured trying to load the report' ; $ response [ 'totalPages' ] = 0 ; $ response [ 'page' ] = 0 ; } if ( $ response [ 'success' ] ) { $ response [ 'success' ] = ! $ report -> getError ( ) ; $ response [ 'output' ] = $ report -> getOutput ( ) ; $ response [ 'totalPages' ] = $ report -> getTotalPages ( ) ; $ response [ 'page' ] = $ report -> getPage ( ) ; } //return the response array return $ response ; }
Loads a page from the report store

@param  string $requestId The request id of the cached report
@param  string $page      The page number to display

@return array             The response array
Loads a page from the report store