コード例 #1
0
ファイル: ReportForm.cs プロジェクト: herokes/Project_BV
        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;
        }
コード例 #2
0
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
 {
     Report_Benhanngoaitru rpt = new Report_Benhanngoaitru();
     rpt.Site = this.Site;
     return rpt;
 }