public function setCallbacks() {
        if ($this->jasperClient) {
            //Get the entity manager
            $em = $this->container->get('doctrine')->getManager($this->entityManager);
            $this->jasperClient->addPostReportExecutionCallback(new PostReportExecution($em, $this->container->get('security.context')));
            $this->jasperClient->addPostReportCacheCallback(new PostReportCache($em));
        }
    }