void mantain() { MaintanPrintReport M = new MaintanPrintReport(); cmd = new SqlCommand("select * from MCpay ", con); con.Open(); cmd.ExecuteNonQuery(); DataSet ds = new DataSet(); SqlDataAdapter da = new SqlDataAdapter(cmd); da.Fill(ds, "MCpay"); DataTable dt = ds.Tables["MCpay"]; M.SetDataSource(ds.Tables["MCpay"]); M.SetParameterValue("Name", main.nameTB.Text); M.SetParameterValue("category", main.CategoryCB.Text); M.SetParameterValue("phone", main.PhoneTB.Text); M.SetParameterValue("startDate", main.dateSTP.Text); M.SetParameterValue("endDate", main.dateETP.Text); M.SetParameterValue("floor", main.floorTB.Text); M.SetParameterValue("stop", main.stopCB.Text); M.SetParameterValue("deliveryContract", main.DeliveryTB.Text); M.SetParameterValue("place", main.placetb.Text); M.SetParameterValue("amount", main.priceTB.Text); M.SetParameterValue("note", main.noteCB.Text); M.SetParameterValue("flooring", main.FlooringTB.Text); M.SetParameterValue("discription", main.discriptionTB.Text); crystalReportViewer1.ReportSource = M; crystalReportViewer1.Refresh(); con.Close(); }