Exemple #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            InPhieuXuatVT rpt = new InPhieuXuatVT();

            rpt.Site = this.Site;
            return(rpt);
        }
Exemple #2
0
        private void frmInPhieuXuatVT_Load(object sender, EventArgs e)
        {
            InPhieuXuatVT rpt = new InPhieuXuatVT();

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

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