Esempio n. 1
0
        private void ReportForm_Load(object sender, EventArgs e)
        {
            dynamic rp;
            switch (typeReport)
            {
                case "benhanngoaitru":
                    rp = new Report_Benhanngoaitru();
                    break;
                case "Phieukhambenh":
                    rp = new Phieukhambenhvaovien();
                    break;
                case "todieutri":
                    rp = new Report_Todieutri();
                    break;
                case "Tongketbenhanngoaitru":
                    rp = new Report_Tongketbenhanngoaitru();
                    break;
                case "toathuoc":
                    rp = new Report_Toathuoc();
                    break;
                case "Bienbanhoichuan":
                    rp = new Report_Bienbanhoichuan();
                    break;
                default:
                    rp = new Report_Todieutri();
                    break;
            }

            if (arrReport != null && arrReport.Count > 0)
            {
                rp.SetDataSource(arrReport);
            }
            crystalReportViewer.ReportSource = rp;
        }
Esempio n. 2
0
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
 {
     Report_Todieutri rpt = new Report_Todieutri();
     rpt.Site = this.Site;
     return rpt;
 }