if (!Page.IsPostBack) { CrystalReportViewer1.Visible = true; ReportDocument rptDoc = new ReportDocument(); CreportsEntities ce = new CreportsEntities(); var qr = ce.products.Select(per => new { ProductDate = per.ProductDate, ProductId = per.ProductId, ProductName = per.ProductName, ProductPrice = per.ProductPrice }).ToList(); rptDoc.Load(Server.MapPath("~/CrystalReport1.rpt")); rptDoc.SetDataSource(qr); CrystalReportViewer1.ReportSource = rptDoc; CrystalReportViewer1.DataBind(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)