コード例 #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            rptCanBo rpt = new rptCanBo();

            rpt.Site = this.Site;
            return(rpt);
        }
コード例 #2
0
        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;
        }