public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { rptCustomerList rpt = new rptCustomerList(); rpt.Site = this.Site; return(rpt); }
protected void Show_Click(object sender, EventArgs e) { if (Session["report"] == null) { CustomerTableAdapters.CustomersTableAdapter da = new CustomerTableAdapters.CustomersTableAdapter(); Customer ds = new Customer(); Customer.CustomersDataTable dt = (Customer.CustomersDataTable)ds.Tables["Customers"]; da.Fill(dt); rpt = new rptCustomerList(); rpt.SetDataSource(ds); CrystalReportViewer.ReportSource = rpt; Session.Add("report", rpt); } }