protected override void AddDefaultDetail() { ReportHeader rh = new ReportHeader(); Cell h = new CommonLabel(100, 40, 280, 80, HeaderLabel); h.Name = "HeaderLabel"; (h as ICenterAlign).CenterAlign = true; h.CaptionAlign = System.Drawing.ContentAlignment.MiddleCenter; h.ServerFont.FontSize = 20; h.ServerFont.FontName = "ºÚÌå"; rh.Cells.Add(h); _report.Sections.Add(rh); GridDetail gd = new GridDetail(); int left = 8; System.Collections.ICollection keys = _report.DataSources.DesignKeys; if (keys == null) { keys = _report.DataSources.Keys; } foreach (string key in keys) { DataSource ds = _report.DataSources[key]; Cell cell = gd.GetDefaultRect(ds); if (cell != null) { cell.X = left; left += cell.Width; if (_datahelper.bCusName(ds.Name)) { cell.Visible = false; } cell.SetY(DefaultConfigs.SECTIONHEADERHEIGHT + 8); gd.Cells.Add(cell); } } if (gd.Cells.Count > 0) { (gd as IAutoDesign).AutoDesign(DefaultConfigs.ReportLeft); _report.DesignWidth = gd.Width + 300; } _report.Sections.Add(gd); }
public GridDetail(GridDetail GridDetail) : base(GridDetail) { }
protected override Section AddALoacleSection(XmlElement xec) { Section section = null; string type = xec.GetAttribute("Type"); switch (type.ToLower()) { case "printpagetitle": section = new PrintPageTitle(); AddOtherControl(xec, section); break; case "printpagesummary": section = new PrintPageSummary(); AddOtherControl(xec, section); break; case "pageheader": section = new PageHeader(); AddOtherControl(xec, section); break; case "pagefooter": section = new PageFooter(); AddOtherControl(xec, section); break; case "reportheader": section = new ReportHeader(); AddHeaderControl(xec, section); break; case "reportsummary": bool baddwhendesign = false; if (xec.HasAttribute("bAddWhenDesign")) { baddwhendesign = bool.Parse(xec.GetAttribute("bAddWhenDesign")); } if (!baddwhendesign) { section = new PageFooter(); AddOtherControl(xec, section); } else { section = new ReportSummary(); AddOtherControl(xec, section); (section as ReportSummary).InitVisibleWidth(); } section.Name = ""; break; case "griddetail": section = new GridDetail(); AddDetailControl(xec, section); break; } if (section != null) { ConvertFromLocaleInfo(xec, section); _report.Sections.Add(section); //section.Name = type; } return(section); }