Exemplo n.º 1
0
        private void NV_Load(object sender, EventArgs e)
        {
            // tabPage QLPT
            RenderDataQLPT();

            // tabPageQLKH
            RenderDataQLKH();

            // tabPageTK

            DataTable      dt     = new DataTable();
            ReportDocument objRep = new CrystalReportThongKe();
            ConnectionInfo mycon  = new ConnectionInfo();
            TableLogOnInfo myinfo = new TableLogOnInfo();

            mycon.IntegratedSecurity = true;
            //mycon.UserID = "RUBY";
            //mycon.Password = "******";
            mycon.ServerName      = "ADMIN";
            mycon.DatabaseName    = "QLPT";
            myinfo.ConnectionInfo = mycon;
            objRep.Database.Tables[0].ApplyLogOnInfo(myinfo);
            crystalReportViewer.ReportSource = objRep;
            crystalReportViewer.Refresh();
        }
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            CrystalReportThongKe rpt = new CrystalReportThongKe();

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