/// <summary> /// 创建一个新的Section List /// </summary> public void CreateNewSectionList() { _DataObj = _Report.DataObj.SectionList; foreach (DIYReport.ReportModel.RptSection dataSection in _DataObj) { DesignSection section = new DesignSection(dataSection); section.IsDisplay = true; SectionCaption caption = new SectionCaption(); section.CaptionCtl = caption; this.Add(section); } RefreshDesignLayout(); _DataObj.BeforeRemoveSection += new DIYReport.ReportModel.RptSectionEventHandler(_DataObj_BeforeRemoveSection); _DataObj._fterCreateNewSection += new System.EventHandler(_DataObj_AfterCreateNewSection); }
// 重新刷新报表设计中所有Section 的显示 private void createDesignSection() { //检查 DataSection 在DesignSectionList 中是否已经创建,如果不存在,就创建它 int i = 0; foreach (DIYReport.ReportModel.RptSection dataSection in _DataObj) { if (!dataSection.HasCreateViewDesign) { DesignSection section = new DesignSection(dataSection); SectionCaption caption = new SectionCaption(); section.IsDisplay = true; section.CaptionCtl = caption; section.SectionList = this; this.Add(section); OnAfterInsertSection(new DesignSectionEventArgs(i, section)); } i++; } RefreshDesignLayout(); }