public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            rptInHoaDon rpt = new rptInHoaDon();

            rpt.Site = this.Site;
            return(rpt);
        }
        private void frmINHOADON_Load(object sender, EventArgs e)
        {
            var query = "SELECT DRINKTABLE.tablename, BILLINFO.id, DRINK.drinkname, DRINK.price, BILLINFO.count, BILLDRINKS.timecheckin, BILLDRINKS.timecheckout, BILLDRINKS.giamgia, BILLDRINKS.TongTien" +
                        " FROM BILLDRINKS INNER JOIN " +
                        " BILLINFO ON BILLDRINKS.id = BILLINFO.idbill INNER JOIN " +
                        " DRINK ON BILLINFO.iddrink = DRINK.id INNER JOIN " +
                        "DRINKTABLE ON BILLDRINKS.idtable = DRINKTABLE.id where BILLDRINKS.billstatus = 0 AND DRINKTABLE.tablename = '" + id + "'";
            SqlDataAdapter da = new SqlDataAdapter(query, cnn);

            try
            {
                DataTable tblInHoaDon = new DataTable();
                da.Fill(tblInHoaDon);
                rptInHoaDon rpt = new rptInHoaDon();
                rpt.SetDataSource(tblInHoaDon);
                crvInHoaDon.ReportSource = rpt;
            }catch (SqlException ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }