Esempio n. 1
0
 bool _InMatrix;                           // true if reportitem is in a matrix
 internal ReportItem(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
 {
     _Name              = null;
     _Style             = null;
     _Action            = null;
     _Top               = null;
     _Left              = null;
     _Height            = null;
     _Width             = null;
     _ZIndex            = 0;
     _Visibility        = null;
     _ToolTip           = null;
     _Label             = null;
     _LinkToChild       = null;
     _Bookmark          = null;
     _RepeatWith        = null;
     _Custom            = null;
     _DataElementName   = null;
     _DataElementOutput = DataElementOutputEnum.Auto;
     // Run thru the attributes
     foreach (XmlAttribute xAttr in xNode.Attributes)
     {
         switch (xAttr.Name)
         {
         case "Name":
             _Name = new Name(xAttr.Value);
             break;
         }
     }
 }
Esempio n. 2
0
        DataElementOutputEnum _DataElementOutput;       // Indicates whether the data point should
        // appear in a data rendering.

        internal DataPoint(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _DataValues        = null;
            _DataLabel         = null;
            _Action            = null;
            _Style             = null;
            _Marker            = null;
            _DataElementName   = null;
            _DataElementOutput = DataElementOutputEnum.Output;

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

                case "DataLabel":
                    _DataLabel = new DataLabel(r, this, xNodeLoop);
                    break;

                case "Action":
                    _Action = new Action(r, this, xNodeLoop);
                    break;

                case "Style":
                    _Style = new Style(r, this, xNodeLoop);
                    break;

                case "Marker":
                    _Marker = new Marker(r, this, xNodeLoop);
                    break;

                case "DataElementName":
                    _DataElementName = xNodeLoop.InnerText;
                    break;

                case "DataElementOutput":
                    _DataElementOutput = Reporting.Rdl.DataElementOutput.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

                default:
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown DataPoint element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
            }
            if (_DataValues == null)
            {
                OwnerReport.rl.LogError(8, "DataPoint requires the DataValues element.");
            }
        }
Esempio n. 3
0
        Style _Style; // Defines border and background style

        #endregion Fields

        #region Constructors

        // appear in a data rendering.
        internal DataPoint(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _DataValues=null;
            _DataLabel=null;
            _Action=null;
            _Style=null;
            _Marker=null;
            _DataElementName=null;
            _DataElementOutput=DataElementOutputEnum.Output;

            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "DataValues":
                        _DataValues = new DataValues(r, this, xNodeLoop);
                        break;
                    case "DataLabel":
                        _DataLabel = new DataLabel(r, this, xNodeLoop);
                        break;
                    case "Action":
                        _Action = new Action(r, this, xNodeLoop);
                        break;
                    case "Style":
                        _Style = new Style(r, this, xNodeLoop);
                        break;
                    case "Marker":
                        _Marker = new Marker(r, this, xNodeLoop);
                        break;
                    case "DataElementName":
                        _DataElementName = xNodeLoop.InnerText;
                        break;
                    case "DataElementOutput":
                        _DataElementOutput = Engine.DataElementOutput.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
                        break;
                    default:
                        // don't know this element - log it
                        OwnerReport.rl.LogError(4, "Unknown DataPoint element '" + xNodeLoop.Name + "' ignored.");
                        break;
                }
            }
            if (_DataValues == null)
                OwnerReport.rl.LogError(8, "DataPoint requires the DataValues element.");
        }
Esempio n. 4
0
        DataElementOutputEnum _DataElementOutput; // Indicates whether the subtotal should appear in a data rendering.
        // Default: NoOutput

        internal Subtotal(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            _ReportItems       = null;
            _Style             = null;
            _Position          = SubtotalPositionEnum.After;
            _DataElementName   = "Total";
            _DataElementOutput = DataElementOutputEnum.NoOutput;

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

                case "Style":
                    _Style = new Style(r, this, xNodeLoop);
                    break;

                case "Position":
                    _Position = SubtotalPosition.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

                case "DataElementName":
                    _DataElementName = xNodeLoop.InnerText;
                    break;

                case "DataElementOutput":
                    _DataElementOutput = fyiReporting.RDL.DataElementOutput.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

                default:
                    break;
                }
            }
            if (_ReportItems == null)
            {
                OwnerReport.rl.LogError(8, "Subtotal requires the ReportItems element.");
            }
        }
Esempio n. 5
0
        Style _Style; // Style properties that override the style

        #endregion Fields

        #region Constructors

        // Default: NoOutput
        internal Subtotal(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _ReportItems=null;
            _Style=null;
            _Position=SubtotalPositionEnum.After;
            _DataElementName="Total";
            _DataElementOutput=DataElementOutputEnum.NoOutput;

            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "ReportItems":
                        _ReportItems = new ReportItems(r, this, xNodeLoop);
                        break;
                    case "Style":
                        _Style = new Style(r, this, xNodeLoop);
                        break;
                    case "Position":
                        _Position = SubtotalPosition.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
                        break;
                    case "DataElementName":
                        _DataElementName = xNodeLoop.InnerText;
                        break;
                    case "DataElementOutput":
                        _DataElementOutput = Engine.DataElementOutput.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
                        break;
                    default:
                        break;
                }
            }
            if (_ReportItems == null)
                OwnerReport.rl.LogError(8, "Subtotal requires the ReportItems element.");
        }
Esempio n. 6
0
 protected override void ParseAttribute(XmlNode attr)
 {
     switch (attr.Name.ToLower())
     {
         case "reportitems":
             _reportItems = new ReportItems(attr, Parent);
             break;
         case "style":
             _style = new Style(attr, this);
             break;
         case "position":
             _position = (PositionEnum)Enum.Parse(typeof(PositionEnum), attr.InnerText);
             break;
         case "dataelementname":
             _dataElementName = attr.InnerText;
             break;
         case "dataelementoutput":
             _dataElementOutput = (DataElementOutputEnum)Enum.Parse(typeof(DataElementOutputEnum), attr.InnerText);
             break;
         default:
             break;
     }
 }
Esempio n. 7
0
        bool _InMatrix;                           // true if grouping is in a matrix

        internal Grouping(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            _Name               = null;
            _Label              = null;
            _GroupExpressions   = null;
            _PageBreakAtStart   = false;
            _PageBreakAtEnd     = false;
            _Custom             = null;
            _Filters            = null;
            _ParentGroup        = null;
            _DataElementName    = null;
            _DataCollectionName = null;
            _DataElementOutput  = DataElementOutputEnum.Output;
            _HideDuplicates     = null;
            // Run thru the attributes
            foreach (XmlAttribute xAttr in xNode.Attributes)
            {
                switch (xAttr.Name)
                {
                case "Name":
                    _Name = new Name(xAttr.Value);
                    break;
                }
            }
            // Loop thru all the child nodes
            foreach (XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                {
                    continue;
                }
                switch (xNodeLoop.Name)
                {
                case "Label":
                    _Label = new Expression(r, this, xNodeLoop, ExpressionType.String);
                    break;

                case "GroupExpressions":
                    _GroupExpressions = new GroupExpressions(r, this, xNodeLoop);
                    break;

                case "PageBreakAtStart":
                    _PageBreakAtStart = Conversion.ToBoolean(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

                case "PageBreakAtEnd":
                    _PageBreakAtEnd = Conversion.ToBoolean(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

                case "Custom":
                    _Custom = new Custom(r, this, xNodeLoop);
                    break;

                case "Filters":
                    _Filters = new Filters(r, this, xNodeLoop);
                    break;

                case "Parent":
                    _ParentGroup = new Expression(r, this, xNodeLoop, ExpressionType.Variant);
                    break;

                case "DataElementName":
                    _DataElementName = xNodeLoop.InnerText;
                    break;

                case "DataCollectionName":
                    _DataCollectionName = xNodeLoop.InnerText;
                    break;

                case "DataElementOutput":
                    _DataElementOutput = Reporting.Rdl.DataElementOutput.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

                default:
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown Grouping element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
            }
            if (this.Name != null)
            {
                try
                {
                    OwnerReport.LUAggrScope.Add(this.Name.Nm, this); // add to referenceable Grouping's
                }
                catch                                                // wish duplicate had its own exception
                {
                    OwnerReport.rl.LogError(8, "Duplicate Grouping name '" + this.Name.Nm + "'.");
                }
            }
            if (_GroupExpressions == null)
            {
                OwnerReport.rl.LogError(8, "Group Expressions are required within group '" + (this.Name == null? "unnamed": this.Name.Nm) + "'.");
            }
        }
Esempio n. 8
0
        internal Table(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p, xNode)
        {
            _TableColumns             = null;
            _Header                   = null;
            _TableGroups              = null;
            _Details                  = null;
            _Footer                   = null;
            _FillPage                 = true;
            _DetailDataElementName    = "Details";
            _DetailDataCollectionName = "Details_Collection";
            _DetailDataElementOutput  = DataElementOutputEnum.Output;
            _IsGrid                   = xNode.Name != "Table"; // a grid is a restricted table to no data behind it

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

                case "Header":
                    _Header = new Header(r, this, xNodeLoop);
                    break;

                case "TableGroups":
                    _TableGroups = new TableGroups(r, this, xNodeLoop);
                    break;

                case "Details":
                    _Details = new Details(r, this, xNodeLoop);
                    break;

                case "Footer":
                    _Footer = new Footer(r, this, xNodeLoop);
                    break;

                case "FillPage":
                    _FillPage = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

                case "DetailDataElementName":
                    _DetailDataElementName = xNodeLoop.InnerText;
                    break;

                case "DetailDataCollectionName":
                    _DetailDataCollectionName = xNodeLoop.InnerText;
                    break;

                case "DetailDataElementOutput":
                    _DetailDataElementOutput = fyiReporting.RDL.DataElementOutput.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

                default:
                    if (DataRegionElement(xNodeLoop))                                   // try at DataRegion level
                    {
                        break;
                    }
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown " + xNode.Name + " element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
            }
            DataRegionFinish();                                 // Tidy up the DataRegion
            if (_TableColumns == null)
            {
                OwnerReport.rl.LogError(8, "TableColumns element must be specified for a " + xNode.Name + ".");
                return;
            }

            // Verify Grid restrictions
            if (_IsGrid)
            {
                if (_TableGroups != null)
                {
                    OwnerReport.rl.LogError(8, "TableGroups not allowed in Grid element '" + xNode.Name + "'.");
                }
            }

            if (OwnerReport.rl.MaxSeverity < 8)
            {
                VerifyCC();                                     // Verify column count
            }
        }
		internal bool ReportItemElement(XmlNode xNodeLoop)
		{
			switch (xNodeLoop.Name)
			{
				case "Style":
					_Style = new Style(OwnerReport, this, xNodeLoop);
					break;
				case "Action":
					_Action = new Action(OwnerReport, this, xNodeLoop);
					break;
				case "Top":
					_Top = new RSize(OwnerReport, xNodeLoop);
					break;
				case "Left":
					_Left = new RSize(OwnerReport, xNodeLoop);
					break;
				case "Height":
					_Height = new RSize(OwnerReport, xNodeLoop);
					break;
				case "Width":
					_Width = new RSize(OwnerReport, xNodeLoop);
					break;
				case "ZIndex":
					_ZIndex = XmlUtil.Integer(xNodeLoop.InnerText);
					break;
				case "Visibility":
					_Visibility = new Visibility(OwnerReport, this, xNodeLoop);
					break;
				case "ToolTip":
					_ToolTip = new Expression(OwnerReport, this, xNodeLoop, ExpressionType.String);
					break;
				case "Label":
					_Label = new Expression(OwnerReport, this, xNodeLoop, ExpressionType.Variant);
					break;
				case "LinkToChild":
					_LinkToChild = xNodeLoop.InnerText;
					break;
				case "Bookmark":
					_Bookmark = new Expression(OwnerReport, this, xNodeLoop, ExpressionType.String);
					break;
				case "RepeatWith":
					_RepeatWith = xNodeLoop.InnerText;
					break;
				case "Custom":
					_Custom = new Custom(OwnerReport, this, xNodeLoop);
					break;
				case "DataElementName":
					_DataElementName = xNodeLoop.InnerText;
					break;
				case "DataElementOutput":
					_DataElementOutput = fyiReporting.RDL.DataElementOutput.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
					break;
                case "rd:DefaultName":
                    break;      // MS tag: we don't use but don't want to generate a warning
				default:  
					return false;	// Not a report item element
			}
			return true;
		}
		bool _InMatrix;		// true if reportitem is in a matrix
		internal ReportItem(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
		{
			_Name=null;
			_Style=null;
			_Action=null;
			_Top=null;
			_Left=null;
			_Height=null;
			_Width=null;
			_ZIndex=0;
			_Visibility=null;
			_ToolTip=null;
			_Label=null;
			_LinkToChild=null;
			_Bookmark=null;
			_RepeatWith=null;
			_Custom=null;
			_DataElementName=null;
			_DataElementOutput=DataElementOutputEnum.Auto;
			// Run thru the attributes
			foreach(XmlAttribute xAttr in xNode.Attributes)
			{
				switch (xAttr.Name)
				{
					case "Name":
						_Name = new Name(xAttr.Value);
						break;
				}
			}
		}
		bool _InMatrix;	// true if grouping is in a matrix

		internal Grouping(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
		{
			_Name=null;
			_Label=null;
			_GroupExpressions=null;
			_PageBreakAtStart=false;
			_PageBreakAtEnd=false;
			_Custom=null;
			_Filters=null;
			_ParentGroup=null;
			_DataElementName=null;
			_DataCollectionName=null;
			_DataElementOutput=DataElementOutputEnum.Output;
			_HideDuplicates=null;
			// Run thru the attributes
			foreach(XmlAttribute xAttr in xNode.Attributes)
			{
				switch (xAttr.Name)
				{
					case "Name":
						_Name = new Name(xAttr.Value);
						break;
				}
			}
			// Loop thru all the child nodes
			foreach(XmlNode xNodeLoop in xNode.ChildNodes)
			{
				if (xNodeLoop.NodeType != XmlNodeType.Element)
					continue;
				switch (xNodeLoop.Name)
				{
					case "Label":
						_Label = new Expression(r, this, xNodeLoop, ExpressionType.String);
						break;
					case "GroupExpressions":
						_GroupExpressions = new GroupExpressions(r, this, xNodeLoop);
						break;
					case "PageBreakAtStart":
						_PageBreakAtStart = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
						break;
					case "PageBreakAtEnd":
						_PageBreakAtEnd = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
						break;
					case "Custom":
						_Custom = new Custom(r, this, xNodeLoop);
						break;
					case "Filters":
						_Filters = new Filters(r, this, xNodeLoop);
						break;
					case "Parent":
						_ParentGroup = new Expression(r, this, xNodeLoop, ExpressionType.Variant);
						break;
					case "DataElementName":
						_DataElementName = xNodeLoop.InnerText;
						break;
					case "DataCollectionName":
						_DataCollectionName = xNodeLoop.InnerText;
						break;
					case "DataElementOutput":
						_DataElementOutput = fyiReporting.RDL.DataElementOutput.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
						break;
					default:	
						// don't know this element - log it
						OwnerReport.rl.LogError(4, "Unknown Grouping element '" + xNodeLoop.Name + "' ignored.");
						break;
				}
			}
			if (this.Name != null)
			{
				try
				{
					OwnerReport.LUAggrScope.Add(this.Name.Nm, this);		// add to referenceable Grouping's
				}
				catch	// wish duplicate had its own exception
				{
					OwnerReport.rl.LogError(8, "Duplicate Grouping name '" + this.Name.Nm + "'.");
				}
			}
			if (_GroupExpressions == null)
				OwnerReport.rl.LogError(8, "Group Expressions are required within group '" + (this.Name==null? "unnamed": this.Name.Nm) + "'.");
		}
Esempio n. 12
0
        internal bool ReportItemElement(XmlNode xNodeLoop)
        {
            switch (xNodeLoop.Name)
            {
            case "Style":
                _Style = new Style(OwnerReport, this, xNodeLoop);
                break;

            case "Action":
                _Action = new Action(OwnerReport, this, xNodeLoop);
                break;

            case "Top":
                _Top = new RSize(OwnerReport, xNodeLoop);
                break;

            case "Left":
                _Left = new RSize(OwnerReport, xNodeLoop);
                break;

            case "Height":
                _Height = new RSize(OwnerReport, xNodeLoop);
                break;

            case "Width":
                _Width = new RSize(OwnerReport, xNodeLoop);
                break;

            case "ZIndex":
                _ZIndex = Conversion.ToInteger(xNodeLoop.InnerText);
                break;

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

            case "ToolTip":
                _ToolTip = new Expression(OwnerReport, this, xNodeLoop, ExpressionType.String);
                break;

            case "Label":
                _Label = new Expression(OwnerReport, this, xNodeLoop, ExpressionType.Variant);
                break;

            case "LinkToChild":
                _LinkToChild = xNodeLoop.InnerText;
                break;

            case "Bookmark":
                _Bookmark = new Expression(OwnerReport, this, xNodeLoop, ExpressionType.String);
                break;

            case "RepeatWith":
                _RepeatWith = xNodeLoop.InnerText;
                break;

            case "Custom":
                _Custom = new Custom(OwnerReport, this, xNodeLoop);
                break;

            case "DataElementName":
                _DataElementName = xNodeLoop.InnerText;
                break;

            case "DataElementOutput":
                _DataElementOutput = Reporting.Rdl.DataElementOutput.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
                break;

            case "rd:DefaultName":
                break;          // MS tag: we don't use but don't want to generate a warning

            default:
                return(false);                          // Not a report item element
            }
            return(true);
        }