/// <inheritdoc/> public override void Delete() { if (ReportPage != null) { ReportPage.Dispose(); Report.Designer.InitPages(Report.Pages.IndexOf(Page) + 1); } ReportPage = null; base.Delete(); }
private void RemoveSubReport(bool delete) { if (reportPage != null) { if (Report != null) { foreach (Base obj in Report.AllObjects) { if (obj is SubreportObject && obj != this) { SubreportObject subReport = obj as SubreportObject; if (subReport.ReportPage == reportPage) { reportPage.Subreport = subReport; reportPage.PageName = subReport.Name; reportPage = null; break; } } } } if (reportPage != null) { if (delete && Report != null) { reportPage.Dispose(); } else { reportPage.Subreport = null; reportPage.PageName = reportPage.Name; } reportPage = null; } } }