Beispiel #1
0
        private static void AddReportMetadataToDataDictionary(FinanceReport report, DataDictionary dataDictionary)
        {
            foreach (var table in report.Tables)
            {
                dataDictionary.AddTableName(table.Name);

                foreach (var column in table.ColumnDefinitions)
                {
                    if (column.Type == FinanceReportColumnDefinition.ColumnType.Text && !string.IsNullOrWhiteSpace(column.Text))
                    {
                        dataDictionary.AddColumnName(table.Name, column.Text);
                    }
                }

                foreach (var row in table.Rows)
                {
                    if (!string.IsNullOrWhiteSpace(row.Name))
                    {
                        dataDictionary.AddRowName(table.Name, row.Name);
                    }
                }
            }
        }