public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { rptCanBo rpt = new rptCanBo(); rpt.Site = this.Site; return(rpt); }
private void frmRptDSCanBo_Load(object sender, EventArgs e) { rptCanBo crCanBo = new rptCanBo(); this.WindowState = FormWindowState.Maximized; this.Controls.Add(crvCanBo); crvCanBo.Dock = DockStyle.Fill; TableLogOnInfo logonInfo = crCanBo.Database.Tables["CANBO"].LogOnInfo; logonInfo.ConnectionInfo.ServerName = MyPublics.strServer; logonInfo.ConnectionInfo.DatabaseName = "QL_SuDungThietBi"; logonInfo.ConnectionInfo.IntegratedSecurity = false; logonInfo.ConnectionInfo.UserID = "TN207User"; logonInfo.ConnectionInfo.Password = "******"; crCanBo.Database.Tables[0].ApplyLogOnInfo(logonInfo); crvCanBo.ReportSource = crCanBo; }