public ActionResult DomesticSalesReport(ReportViewModel model) { var operationResult = new OperationResult(); MemoryStream ms = new MemoryStream(); try { ms = ReportingManager.CreateDomesticSalesReport(model.StartDate, model.EndDate); } catch (Exception ex) { operationResult.Message = "Error occured printing Domestic Sales Report"; logger.ErrorFormat("Error occured printing Domestic Sales Report: {0} ", ex.ToString()); this.AddNotification(operationResult.Message, NotificationType.ERROR); } return(new FileStreamResult(ms, "application/pdf")); }