Ejemplo n.º 1
0
        Visibility _Visibility;         // Indicates if all of the dynamic rows for this grouping
        // should be hidden and replaced with a subtotal row for
        // this grouping scope

        internal DynamicRows(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            _Grouping    = null;
            _Sorting     = null;
            _Subtotal    = null;
            _ReportItems = null;
            _Visibility  = null;
            // Run thru the attributes
            //			foreach(XmlAttribute xAttr in xNode.Attributes)
            //			{
            //			}

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

                case "Sorting":
                    _Sorting = new Sorting(r, this, xNodeLoop);
                    break;

                case "Subtotal":
                    _Subtotal = new Subtotal(r, this, xNodeLoop);
                    break;

                case "ReportItems":
                    _ReportItems = new ReportItems(r, this, xNodeLoop);
                    break;

                case "Visibility":
                    _Visibility = new Visibility(r, this, xNodeLoop);
                    break;

                default:
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown DynamicRow element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
            }
            if (_Grouping == null)
            {
                OwnerReport.rl.LogError(8, "DynamicRows requires the Grouping element.");
            }
            if (_ReportItems == null || _ReportItems.Items.Count != 1)
            {
                OwnerReport.rl.LogError(8, "DynamicRows requires the ReportItems element defined with exactly one report item.");
            }
        }
Ejemplo n.º 2
0
		Visibility _Visibility;	// Indicates if all of the dynamic rows for this grouping
							// should be hidden and replaced with a subtotal row for
							// this grouping scope		

		internal DynamicRows(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
		{
			_Grouping=null;
			_Sorting=null;
			_Subtotal=null;
			_ReportItems=null;
			_Visibility=null;
			// Run thru the attributes
			//			foreach(XmlAttribute xAttr in xNode.Attributes)
			//			{
			//			}

			// Loop thru all the child nodes
			foreach(XmlNode xNodeLoop in xNode.ChildNodes)
			{
				if (xNodeLoop.NodeType != XmlNodeType.Element)
					continue;
				switch (xNodeLoop.Name)
				{
					case "Grouping":
						_Grouping = new Grouping(r, this, xNodeLoop);
						break;
					case "Sorting":
						_Sorting = new Sorting(r, this, xNodeLoop);
						break;
					case "Subtotal":
						_Subtotal = new Subtotal(r, this, xNodeLoop);
						break;
					case "ReportItems":
						_ReportItems = new ReportItems(r, this, xNodeLoop);
						break;
					case "Visibility":
						_Visibility = new Visibility(r, this, xNodeLoop);
						break;
					default:	
						// don't know this element - log it
						OwnerReport.rl.LogError(4, "Unknown DynamicRow element '" + xNodeLoop.Name + "' ignored.");
						break;
				}
			}
			if (_Grouping == null)
				OwnerReport.rl.LogError(8, "DynamicRows requires the Grouping element.");
			if (_ReportItems == null || _ReportItems.Items.Count != 1)
				OwnerReport.rl.LogError(8, "DynamicRows requires the ReportItems element defined with exactly one report item.");
		}