Exemplo n.º 1
0
        Values _Values;                     // The default values for the parameter

        internal DefaultValue(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            _DataSetReference = null;
            _Values           = null;

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

                case "Values":
                    _Values = new Values(r, this, xNodeLoop);
                    break;

                default:
                    break;
                }
            }
        }
Exemplo n.º 2
0
        ParameterValues _ParameterValues;               // Hardcoded values for the parameter

        internal ValidValues(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            _DataSetReference = null;
            _ParameterValues  = null;

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

                case "ParameterValues":
                    _ParameterValues = new ParameterValues(r, this, xNodeLoop);
                    break;

                default:
                    OwnerReport.rl.LogError(4, "Unknown ValidValues element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
            }
            if (_DataSetReference == null)
            {
                if (_ParameterValues == null)
                {
                    OwnerReport.rl.LogError(8, "For ValidValues element either DataSetReference or ParameterValue must be specified, but not both.");
                }
            }
            else if (_ParameterValues != null)
            {
                OwnerReport.rl.LogError(8, "For ValidValues element either DataSetReference or ParameterValue must be specified, but not both.");
            }
        }