public ActionResult OpenDebitMemoReport(List <DebitMemoReportModel> memos) { var operationResult = new OperationResult(); MemoryStream ms = new MemoryStream(); try { ms = ReportingManager.CreateOpenDebitMemoReport(memos); } catch (Exception ex) { operationResult.Message = "Error occured printing Open Debit Memos"; logger.ErrorFormat("Error occured printing Open Debit Memos: {0} ", ex.ToString()); this.AddNotification(operationResult.Message, NotificationType.ERROR); } return(new FileStreamResult(ms, "application/pdf")); }