// GET: Dealers/download/5 public ActionResult RegCertViewer(int id) { ReportViewer reportViewer = new ReportViewer(); reportViewer.ProcessingMode = ProcessingMode.Local; reportViewer.SizeToReportContent = true; reportViewer.LocalReport.ReportPath = Request.MapPath(Request.ApplicationPath) + @"Reports\RegCert.rdlc"; ReportParameter Id = new ReportParameter("Id", id.ToString()); reportViewer.LocalReport.SetParameters(new ReportParameter[] { Id }); reportViewer.LocalReport.DataSources.Clear(); reportViewer.LocalReport.DataSources.Add(new ReportDataSource("RegistrationCert", _dealerAppService.PrintDealer(id))); reportViewer.LocalReport.Refresh(); reportViewer.ProcessingMode = ProcessingMode.Local; reportViewer.Width = 1200; reportViewer.Height = 500; reportViewer.ShowPrintButton = true; reportViewer.ZoomMode = ZoomMode.FullPage; ViewBag.rptRegCert = reportViewer; return(View()); }