DataSet1 ds1 = new DataSet1(); OleDbConnection con=new OleDbConnection("Provider=Microsoft.jet.oledb.4.0; data source="+Application.StartupPath+@"\DataInfo1.mdb"); con.Open(); OleDbDataAdapter da=new OleDbDataAdapter(@"SELECT ct.custID, c.custName, c.custAdd, ct.custTranDate, ct.custTranType, ct.custPaidAmt, ct.custDueAmt, c.custArea FROM custTransaction AS ct LEFT JOIN custDetails AS c ON ct.custID = c.custID WHERE ct.custID='CUST-000002' and ct.custTranDate BETWEEN #2/28/13# AND #3/1/13#;",con); DataSet ds = new DataSet(); DataTable dt = new DataTable(); da.Fill(dt); ds1 = dt; //Error is here // MessageBox.Show(ds1.Tables[0].Rows.Count.ToString()); CrystalReport2 cr = new CrystalReport2(); cr.SetDataSource(ds1); this.crystalReportViewer1.ReportSource =cr; this.crystalReportViewer1.Show();
DataTable
DataSet
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)