Exemplo n.º 1
0
        private WFReport.Metadata.Table ParseTable(XmlElement node)
        {
            WFReport.Metadata.Table table = new Metadata.Table();

            table.Type = Metadata.TableType.DataTable;

            foreach (XmlElement i in node.ChildNodes)
            {
                if (i.Name == "name")
                    table.Name = i.InnerText;

                if (i.Name == "column")
                    table.Columns.Add(i.InnerText, ParseColumn(i));
            }

            return table;
        }
Exemplo n.º 2
0
        private WFReport.Metadata.Table ParseFactTable(XmlElement node)
        {
            WFReport.Metadata.Table table = new Metadata.Table();

            foreach (XmlElement i in node.ChildNodes)
            {
                if (i.Name == "name")
                    table.Name = i.InnerText;

                if (i.Name == "aggregate")
                {
                    var aggregates = ParseAggregatesAndInformation(i).ToArray();
                    foreach (var j in aggregates)
                    {
                        j.Aggregate = true;
                        table.Columns.Add(j.Name, j);
                    }
                }

                if (i.Name == "information")
                {
                    var infos = ParseAggregatesAndInformation(i).ToArray();
                    foreach (var j in infos)
                    {
                        table.Columns.Add(j.Name, j);
                    }
                }
            }

            return table;
        }