public FileResult AgreementReport(OfferModel parameters) { ReportServices ReportServ = new ReportServices(); byte[] fileBytes = ReportServ.GetAgreementReport((int)parameters.OfferId, SessionWeb.User.UserId ?? 0); string fileName = "AgreementReport.pdf"; return(File(fileBytes, System.Net.Mime.MediaTypeNames.Application.Pdf, fileName)); }