コード例 #1
0
        public Report GetReport(decimal ID, System.Type ReportType, bool Open)
        {
            Report report = null;

            if (ReportType == typeof(OlapReport))
            {
                report = new OlapReport(ID, this._owner);
            }
            else if (ReportType == typeof(StorecheckReport))
            {
                report = new StorecheckReport(ID, this._owner);
            }
            else if (ReportType == typeof(CustomSqlReport))
            {
                report = new CustomSqlReport(ID, this._owner);
            }
            else if (ReportType == typeof(CustomMdxReport))
            {
                report = new CustomMdxReport(ID, this._owner);
            }
            else
            {
                throw new Exception("ReportType " + ReportType.ToString() + " is not supported");
            }

            if (Open)
            {
                report.Open();
            }

            report.StartExecuteEvent += new EventHandler(report_StartExecuteEvent);
            report.EndExecuteEvent   += new EventHandler(report_EndExecuteEvent);
            return(report);
        }
コード例 #2
0
        private void BackButton_Click(object sender, System.EventArgs e)
        {
            _report.Close(false);
            string reportId=_user.ReportSystem.GetReportTypeCode(_report.GetType()).ToString();

            _report=null;
            Response.Redirect(Request.ApplicationPath + "/ReportList.aspx?content=List&rpttype=" + reportId);
        }
コード例 #3
0
        protected void BackButton_Click(object sender, System.EventArgs e)
        {
            _report.Close(false);
            string reportId = _user.ReportSystem.GetReportTypeCode(_report.GetType()).ToString();

            _report = null;
            Response.Redirect(Request.ApplicationPath + "/ReportList.aspx?content=List&rpttype=" + reportId);
        }
コード例 #4
0
        protected override void LoadSession()
        {
            base.LoadSession();

            //debug
            //LoadReport();
            //return;

            if(Session["Report"]==null)
                throw new Exception("Session failure : report");

            _report=(FI.BusinessObjects.CustomMdxReport)Session["Report"];
        }
コード例 #5
0
        protected override void LoadSession()
        {
            base.LoadSession();

            //debug
            //LoadReport();
            //return;



            if (Session["Report"] == null)
            {
                throw new Exception("Session failure : report");
            }

            _report = (FI.BusinessObjects.CustomMdxReport)Session["Report"];
        }
コード例 #6
0
        private void LoadReportFromSession(decimal Id)
        {
            try
            {
                _report = (FI.BusinessObjects.CustomMdxReport)Session["Report"];
            }
            catch (InvalidCastException exc)
            {
                if (Id == -1)
                {
                    throw new Exception("Cannot load report from session");
                }

                LoadReportFromId(Id);
            }

            if (_report.ID != Id || _report.State == Report.StateEnum.Closed)
            {
                LoadReportFromId(Id);
            }
        }
コード例 #7
0
        private void LoadReportFromSession(decimal Id)
        {
            try
            {
                _report=(FI.BusinessObjects.CustomMdxReport)Session["Report"];
            }
            catch(InvalidCastException exc)
            {
                if(Id==-1)
                    throw new Exception("Cannot load report from session");

                LoadReportFromId(Id);
            }

            if(_report.ID!=Id || _report.State==Report.StateEnum.Closed)
            {
                LoadReportFromId(Id);
            }
        }
コード例 #8
0
 private void LoadReportFromId(decimal Id)
 {
     _report=(FI.BusinessObjects.CustomMdxReport)_user.ReportSystem.GetReport(Id , typeof(FI.BusinessObjects.CustomMdxReport) , true);
     Session["Report"]=_report;
 }
コード例 #9
0
        public Report GetReport(decimal ID , System.Type ReportType , bool Open)
        {
            Report report=null;

            if(ReportType==typeof(OlapReport))
            {
                report=new OlapReport(ID , this._owner);
            }
            else if(ReportType==typeof(StorecheckReport))
            {
                report=new StorecheckReport(ID , this._owner);
            }
            else if(ReportType==typeof(CustomSqlReport))
            {
                report=new CustomSqlReport(ID , this._owner);
            }
            else if(ReportType==typeof(CustomMdxReport))
            {
                report=new CustomMdxReport(ID , this._owner);
            }
            else
            {
                throw new Exception("ReportType " + ReportType.ToString() + " is not supported");
            }

            if(Open)
                report.Open();

            report.StartExecuteEvent+=new EventHandler(report_StartExecuteEvent);
            report.EndExecuteEvent+=new EventHandler(report_EndExecuteEvent);
            return report;
        }
コード例 #10
0
 private void LoadReportFromId(decimal Id)
 {
     _report           = (FI.BusinessObjects.CustomMdxReport)_user.ReportSystem.GetReport(Id, typeof(FI.BusinessObjects.CustomMdxReport), true);
     Session["Report"] = _report;
 }