private void Data()
        {
            SqlDataReader rdr = null;
            SqlCommand cmd = new SqlCommand("SHOWALL_STATEMENT_INFO", Conn);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add("@P_CustomerName", SqlDbType.NVarChar).Value = Customer_name.Trim();
            cmd.Parameters.Add("@P_StartDate", SqlDbType.DateTime).Value = Start_Date.ToString("dd/MM/yyyy 00:00");
            cmd.Parameters.Add("@P_EndDate", SqlDbType.DateTime).Value = End_Date.ToString("dd/MM/yyyy 23:59");

            rdr = cmd.ExecuteReader();
            if (rdr.HasRows)
            {
                DataTable dtPoHard = new DataTable();
                dtPoHard.Load(rdr);
                //dgvStatementHeadData.DataSource = dtPoHard;

                Statement.CtrStatementDetailReport Ctr = new CtrStatementDetailReport();
                Ctr.SetDataSource(dtPoHard);
                CrvStatementDetail.ReportSource = Ctr;
                CrvStatementDetail.Refresh();
                CrvStatementDetail.Show();
            }

            //lblCheckSale.Text = "พบ : " + CheckResult.ToString() + " รายการ";
            rdr.Close();
            //CalculatePayMoney();
        }
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
 {
     CtrStatementDetailReport rpt = new CtrStatementDetailReport();
     rpt.Site = this.Site;
     return rpt;
 }