public function updateAction($person_id, $report_id, Request $request)
    {
        $em = $this->getDoctrine()->getManager();

        $report = $em->getRepository('ChillReportBundle:Report')->find($report_id);

        if (!$report) {
            throw $this->createNotFoundException(
                $this->get('translator')->trans('Unable to find this report.'));
        }
        
        $this->denyAccessUnlessGranted('CHILL_REPORT_UPDATE', $report);

        $editForm = $this->createEditForm($report);
        $editForm->handleRequest($request);

        if ($editForm->isValid()) {
            $em->flush();

            $this->get('session')
                ->getFlashBag()
                ->add('success', 
                    $this->get('translator')
                        ->trans('Success : report updated!')
                );

            return $this->redirect($this->generateUrl('report_view', 
                array('person_id' => $report->getPerson()->getId(), 'report_id' => $report_id)));
        }

        $this->get('session')
            ->getFlashBag()
            ->add('error',
                $this->get('translator')
                    ->trans('The form is not valid. The report has not been updated !')
            );

        return $this->render('ChillReportBundle:Report:edit.html.twig', array(
            'edit_form'   => $editForm->createView(),
            'person' => $report->getPerson()
        ));
    }