/// <summary>
        /// thực hiện khởi tạo vớibáo cáo MAHDN
        /// </summary>
        /// <param name="MAHDN"></param>
        public fReport(string MAHDN, string MANCC)
        {
            InitializeComponent();
            CrystalReportHoaDonNhap cr = new CrystalReportHoaDonNhap();

            cr.SetDataSource(CTHDNdao.Instance.getListCTHDNbyMAHD(MAHDN));

            ParameterFieldDefinitions crParameterFieldDefinitions = cr.DataDefinition.ParameterFields;
            ParameterFieldDefinition  crParameterFieldDefinition  = crParameterFieldDefinitions["MANCC"];

            ParameterDiscreteValue crParameterDiscreteValue = new ParameterDiscreteValue();

            crParameterDiscreteValue.Value = MANCC;

            ParameterValues crParameterValues = new ParameterValues();

            //reset lại value
            crParameterValues = crParameterFieldDefinition.CurrentValues;
            crParameterValues.Add(crParameterDiscreteValue);

            crParameterFieldDefinition.ApplyCurrentValues(crParameterValues);


            crystalReportViewerBills.ReportSource = cr;
            crystalReportViewerBills.Refresh();
        }
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            CrystalReportHoaDonNhap rpt = new CrystalReportHoaDonNhap();

            rpt.Site = this.Site;
            return(rpt);
        }