@PathVariable("executionId") final Long executionId,
@RequestParam(value = "fmt", required = false) final ReportExecExportFormat fmt) throws NotFoundException {
ReportExec reportExec = reportExecDAO.find(executionId);
if (reportExec == null) {
throw new NotFoundException("Report execution " + executionId);
}
if (!ReportExecStatus.SUCCESS.name().equals(reportExec.getStatus()) || reportExec.getExecResult() == null) {
SyncopeClientCompositeErrorException sccee = new SyncopeClientCompositeErrorException(
HttpStatus.BAD_REQUEST);
SyncopeClientException sce = new SyncopeClientException(SyncopeClientExceptionType.InvalidReportExec);