/// <summary> /// Checks for any unused elements in the presentation and populates the <paramref name="missingReport" /> variable. /// </summary> /// <param name="missingReport">The InstanceReport object to populate.</param> /// <returns>True on success or false for fail.</returns> private bool BuildMissingDataReport( out InstanceReport missingReport ) { missingReport = null; if( this.markupCache.Count == this.presentationElements.Count ) return false; missingReport = new InstanceReport(); missingReport.ReportName = ReportBuilder._uncategorizedLineItems; missingReport.ReportLongName = ReportBuilder._uncategorizedLineItems; missingReport.Version = this.currentAssemblyVersion; List<string> markupElements = new List<string>( this.markupCache.Keys ); markupElements.Sort(); foreach( string markupEl in markupElements ) { if( this.presentationElements.ContainsKey( markupEl ) ) continue; InstanceReportRow row = new InstanceReportRow(); row.BalanceType = "na"; row.Cells.AddRange( this.markupCache[ markupEl ] ); row.ElementDataType = "string"; row.ElementDefenition = null; row.ElementReferences = null; row.Label = string.Format( "[{0}]", markupEl ); row.PeriodType = "na"; if( markupEl.Contains( "_" ) ) row.ElementPrefix = markupEl.Split( '_' )[ 0 ]; missingReport.Rows.Add( row ); } if( missingReport.Rows.Count == 0 ) return false; this.BuildReportColumns( missingReport, true ); ReportBuilder.FillMissingCells( missingReport ); //InstanceUtils.TOP_LEVEL_REPORT_INDICATOR string saveAs = Path.Combine( this.currentReportDirectory, InstanceUtils.TOP_LEVEL_REPORT_INDICATOR + _missingReportIndex + ".xml" ); missingReport.SaveAsXml( saveAs ); return true; }