private int _GetSubReportsCount(SelectReportWrapper reportWrapper) { ReportsGenerator generator = App.Current.ReportGenerator; Debug.Assert(null != App.Current.ReportGenerator); Debug.Assert(generator.GetPresentedNames(false).Contains(reportWrapper.Name.Name)); ReportInfo report = generator.GetReportInfo(reportWrapper.Name.Name); int result = 0; if ((null != report) && (null != report.SubReports)) { result = report.SubReports.Count; } return(result); }