using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebViewerFlashviewer.Reports;

namespace WebViewerAcrobatReader
{
    public partial class WebForm2 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            GrapeCity.ActiveReports.PageReport rpt = new GrapeCity.ActiveReports.PageReport(new System.IO.FileInfo(Server.MapPath(@"Reports\RDL报表.rdlx")));
            this.WebViewer1.Report = rpt;
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            var a = this.DropDownList1.SelectedIndex;
            if (a == 0)
            {
                GrapeCity.ActiveReports.PageReport rpt = new GrapeCity.ActiveReports.PageReport(new System.IO.FileInfo(Server.MapPath(@"Reports\RDL报表.rdlx")));
                this.WebViewer1.Report = rpt;
            }
            if (a == 1)
            {
                GrapeCity.ActiveReports.PageReport rpt = new GrapeCity.ActiveReports.PageReport(new System.IO.FileInfo(Server.MapPath(@"Reports\页面报表.rdlx")));
                this.WebViewer1.Report = rpt;
            }
            if (a == 2)
            {
                GrapeCity.ActiveReports.SectionReport rpt = new GrapeCity.ActiveReports.SectionReport();
                rpt.LoadLayout(Server.MapPath(@"Reports\区域报表.rpx"));
                this.WebViewer1.Report = rpt;
            }
            if (a == 3)
            {
                SectionReport1 rpt = new SectionReport1();
                this.WebViewer1.Report = rpt;
            }

        }
    }
}