List<CategoryGrouping> _Items; // list of category groupings

        #endregion Fields

        #region Constructors

        internal CategoryGroupings(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            CategoryGrouping cg;
            _Items = new List<CategoryGrouping>();
            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "CategoryGrouping":
                        cg = new CategoryGrouping(r, this, xNodeLoop);
                        break;
                    default:
                        cg=null;		// don't know what this is
                        break;
                }
                if (cg != null)
                    _Items.Add(cg);
            }
            if (_Items.Count == 0)
                OwnerReport.rl.LogError(8, "For CategoryGroupings at least one CategoryGrouping is required.");
            else
                _Items.TrimExcess();
        }
Ejemplo n.º 2
0
        List <CategoryGrouping> _Items;                  // list of category groupings

        internal CategoryGroupings(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            CategoryGrouping cg;

            _Items = new List <CategoryGrouping>();
            // Loop thru all the child nodes
            foreach (XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                {
                    continue;
                }
                switch (xNodeLoop.Name)
                {
                case "CategoryGrouping":
                    cg = new CategoryGrouping(r, this, xNodeLoop);
                    break;

                default:
                    cg = null;                                          // don't know what this is
                    break;
                }
                if (cg != null)
                {
                    _Items.Add(cg);
                }
            }
            if (_Items.Count == 0)
            {
                OwnerReport.rl.LogError(8, "For CategoryGroupings at least one CategoryGrouping is required.");
            }
            else
            {
                _Items.TrimExcess();
            }
        }