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); }
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); }
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); }
protected override void LoadSession() { base.LoadSession(); //debug //LoadReport(); //return; if(Session["Report"]==null) throw new Exception("Session failure : report"); _report=(FI.BusinessObjects.CustomSqlReport)Session["Report"]; }
protected override void LoadSession() { base.LoadSession(); //debug //LoadReport(); //return; if (Session["Report"] == null) { throw new Exception("Session failure : report"); } _report = (FI.BusinessObjects.CustomSqlReport)Session["Report"]; }
private void LoadReportFromSession(decimal Id) { try { _report = (FI.BusinessObjects.CustomSqlReport)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); } }
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; }
private void LoadReportFromId(decimal Id) { _report = (FI.BusinessObjects.CustomSqlReport)_user.ReportSystem.GetReport(Id, typeof(FI.BusinessObjects.CustomSqlReport), true); Session["Report"] = _report; }
private void LoadReportFromSession(decimal Id) { try { _report=(FI.BusinessObjects.CustomSqlReport)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); } }
private void LoadReportFromId(decimal Id) { _report=(FI.BusinessObjects.CustomSqlReport)_user.ReportSystem.GetReport(Id , typeof(FI.BusinessObjects.CustomSqlReport) , true); Session["Report"]=_report; }