public static void MakeOverviewReports(this classificationReportCollection reportCollection, classificationReportCollectionSettings settings, aceAuthorNotation appInfo, ILogBuilder log, String name = "", String description = "") { classificationReportDataComplexContext context = new classificationReportDataComplexContext(); DataTableConverterASCII dataTableConverterASCII = new DataTableConverterASCII(); classificationReportStyleDefinition style = classificationReportStyleDefinition.GetDefault(settings.style.groups); if (reportCollection.name.isNullOrEmpty()) { reportCollection.name = name; } if (description.isNullOrEmpty()) { reportCollection.description += description; } MakeReport(reportCollection, settings, appInfo, log, style, context); //reportSpace.ConstructTable("cumulative_" + reportCollection.name, reportCollection.description, style); foreach (var pair in reportCollection.Children) { MakeReport(pair.Value, settings, appInfo, log, style, context); } foreach (var pair in context.comparative_tables) { var comparative_table = pair.Value.GetRowCollectionTable("complete_summary_" + pair.Key); //context.comparative_tables.GetRowCollectionTable("complete_comparative"); comparative_table.SetTitle("complete_summary_" + pair.Key); comparative_table.GetReportAndSave(reportCollection.rootFolder, appInfo); } foreach (var pair in context.comparative_narrow_tables) { var comparative_table = pair.Value.GetRowCollectionTable("complete_summary_ascii" + pair.Key); //context.comparative_tables.GetRowCollectionTable("complete_comparative"); comparative_table.SetTitle("complete_summary_ascii" + pair.Key); dataTableConverterASCII.ConvertToFile(comparative_table, reportCollection.rootFolder, comparative_table.TableName + "_ascii.txt", DataTableConverterASCIISettings.GetCommaSeparatedValues()); //builderForText bt = new builderForText(); //bt.AppendTable(comparative_table); //bt.GetContent().saveStringToFile(reportCollection.rootFolder.pathFor(comparative_table.TableName + "_ascii.txt", Data.enums.getWritableFileMode.overwrite, "ASCII export of comparative table")); comparative_table.GetReportAndSave(reportCollection.rootFolder, appInfo); } var overview_table = context.overview_tables.GetRowCollectionTable("complete_overview"); overview_table.SetTitle("complete_overview"); overview_table.GetReportAndSave(reportCollection.rootFolder, appInfo); //.GetAggregatedTable("summary", Core.math.aggregation.dataPointAggregationAspect.subSetOfRows, log); }
/// <summary> /// Gets the report and save. /// </summary> /// <param name="input">The input.</param> /// <param name="folder">The folder.</param> /// <param name="notation">The notation.</param> /// <param name="fileprefix">The fileprefix.</param> /// <returns></returns> public static List <DataTableForStatistics> GetReportAndSave(this Dictionary <String, DataTable> input, folderNode folder, aceAuthorNotation notation, String fileprefix = "", DataTableConverterASCII converter = null) { List <DataTableForStatistics> output = new List <DataTableForStatistics>(); foreach (var pair in input) { String p_m = folder.pathFor(fileprefix + pair.Key); output.Add(pair.Value.GetReportAndSave(folder, notation, fileprefix + pair.Key)); if (converter != null) { converter.ConvertToFile(pair.Value, folder, pair.Value.TableName, DataTableConverterASCIISettings.GetCommaSeparatedValues()); } } return(output); }