private void glassButton3_Click(object sender, EventArgs e)
        {
            _cmd = new SqlCommand("select PHOTO from T_IMAGE", frmMainForm._MasterCon);
            _da  = new SqlDataAdapter(_cmd);
            DataTable dt2 = new DataTable();

            _da.Fill(dt2);
            frmEmpMange r = new frmEmpMange();

            byte[] imageData;

            imageData            = r.ReadFile(Application.StartupPath + @"\back.BMP");
            dt2.Rows[0]["PHOTO"] = imageData;

            if (!checkBox2.Checked)
            {
                rptCardBack      card       = new rptCardBack();
                frmReportViewer2 viewreport = new frmReportViewer2();
                card.Database.Tables["T_IMAGE"].SetDataSource(dt2);
                viewreport.crystalReportViewer1.ReportSource = card;
                viewreport.ShowDialog();
            }
            else
            {
                rptCardBack_PS   card       = new rptCardBack_PS();
                frmReportViewer2 viewreport = new frmReportViewer2();
                card.Database.Tables["T_IMAGE"].SetDataSource(dt2);
                viewreport.crystalReportViewer1.ReportSource = card;
                viewreport.ShowDialog();
            }
        }
Beispiel #2
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            rptCardBack rpt = new rptCardBack();

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