示例#1
0
        protected ReportDesignView GetDesignView()
        {
            ReportDesignView view = null;

            if (string.IsNullOrEmpty(FirstStepPage) == false && this.Request.FilePath.Substring(this.Request.FilePath.LastIndexOf("/") + 1).ToUpper().StartsWith(FirstStepPage.ToUpper()) == true &&
                string.IsNullOrEmpty(this.GetRequestParam("isback")) == true)
            {
                this.Session.Remove(this.sessionKey);
            }
            if (this.Session[this.sessionKey] == null)
            {
                view = new ReportDesignView();
                if (this.Request.QueryString["reportid"] != "" && this.Request.QueryString["reportid"] != null)
                {
                    string           strRptId  = this.Request.QueryString["reportid"];
                    ReportViewFacade rptFacade = new ReportViewFacade(this.DataProvider);
                    view          = rptFacade.BuildReportDesignViewByReportId(strRptId);
                    view.ReportID = view.DesignMain.ReportID;
                }
                this.Session.Add(this.sessionKey, view);
            }
            else
            {
                view = (ReportDesignView)this.Session[this.sessionKey];
            }
            return(view);
        }
示例#2
0
        /// <summary>
        /// 生成报表文件
        /// </summary>
        /// <param name="reportId">报表ID</param>
        /// <param name="formatFile">报表格式模板</param>
        /// <param name="reportFile">生成的报表文件名称</param>
        /// <returns>报表文件路径</returns>
        public string Generate(string reportId, string formatFile, string reportFile)
        {
            ReportViewFacade rptFacade  = new ReportViewFacade(this.DataProvider);
            ReportDesignView designView = rptFacade.BuildReportDesignViewByReportId(reportId);

            return(this.Generate(designView, formatFile, reportFile));
        }