Beispiel #1
0
        List<Filter> _Items; // list of Filter

        #endregion Fields

        #region Constructors

        internal Filters(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            Filter f;
            _Items = new List<Filter>();
            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "Filter":
                        f = new Filter(r, this, xNodeLoop);
                        break;
                    default:
                        f=null;		// don't know what this is
                        // don't know this element - log it
                        OwnerReport.rl.LogError(4, "Unknown Filters element '" + xNodeLoop.Name + "' ignored.");
                        break;
                }
                if (f != null)
                    _Items.Add(f);
            }
            if (_Items.Count == 0)
                OwnerReport.rl.LogError(8, "Filters require at least one Filter be defined.");
            else
                _Items.TrimExcess();
        }