public ActionResult InventoryReport(List <InventoryPartReportModel> parts) { var operationResult = new OperationResult(); MemoryStream ms = new MemoryStream(); try { var model = new InventoryReportModel(); model.InventoryParts = parts; ms = ReportingManager.CreateInventoryReport(model); } catch (Exception ex) { operationResult.Message = "Error occured printing Inventory Report"; logger.ErrorFormat("Error occured printing Inventory Report: {0} ", ex.ToString()); this.AddNotification(operationResult.Message, NotificationType.ERROR); } return(new FileStreamResult(ms, "application/pdf")); }