public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { reportDeposits rpt = new reportDeposits(); rpt.Site = this.Site; return(rpt); }
private void reportDeposit_Load(object sender, EventArgs e) { reportDeposits report = new reportDeposits(); OleDbConnection myDb = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=Stokvel Database.accdb"); DataSet ds = new DataSet(); OleDbDataAdapter myAdapter = new OleDbDataAdapter(@"SELECT * FROM Deposits ", myDb); myAdapter.Fill(ds, "Deposits"); report.SetDataSource(ds.Tables["Deposits"]); txtSummart.Text = Class1.MemberID; crystalReportViewer1.SelectionFormula = "{Deposits.MembershipID}='" + txtSummart.Text + "'"; crystalReportViewer1.ReportSource = report; crystalReportViewer1.RefreshReport(); crystalReportViewer1.Refresh(); }