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

            rpt.Site = this.Site;
            return(rpt);
        }
        private void frmInThongKeHDNgay_Load(object sender, EventArgs e)
        {
            InDSHoaDonTheoNgay rpt = new InDSHoaDonTheoNgay();

            rpt.DataSourceConnections[0].SetConnection(conn.ServerName1, conn.DataBase, conn.StrUser, conn.StrPass);
            //rpt.SetDatabaseLogon(frmKetNoiHeThong.Luu.user, frmKetNoiHeThong.Luu.pass);
            rpt.Refresh();
            ParameterFieldDefinitions pFielDefinitions = rpt.DataDefinition.ParameterFields;
            ParameterFieldDefinition  pfdMaPN          = pFielDefinitions["pNgayHD"];
            ParameterDiscreteValue    pdvMalop         = new ParameterDiscreteValue();

            pdvMalop.Value = p;
            pfdMaPN.CurrentValues.Clear();
            pfdMaPN.CurrentValues.Add(pdvMalop);
            pfdMaPN.ApplyCurrentValues(pfdMaPN.CurrentValues);
            crystalReportViewer1.ReportSource     = rpt;
            crystalReportViewer1.DisplayToolbar   = true;
            crystalReportViewer1.DisplayStatusBar = false;
            crystalReportViewer1.Refresh();
        }