Esempio n. 1
0
        ReportItems _ReportItems;               // The elements of the column header layout
                                                // This ReportItems collection must contain exactly
                                                // one ReportItem. The Top, Left, Height and Width
                                                // for this ReportItem are ignored. The position is
                                                // taken to be 0, 0 and the size to be 100%, 100%.

        internal StaticColumn(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            _ReportItems = null;

            // 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;

                default:
                    break;
                }
            }
            if (_ReportItems == null)
            {
                OwnerReport.rl.LogError(8, "StaticColumn requires the ReportItems element.");
            }
        }
Esempio n. 2
0
        internal float GetOffsetCalc(Report rpt)
        {
            WorkClass wc = GetWC(rpt);
            float     x;

            if (this._TC != null)
            {                   // must be part of a table
                Table t        = _TC.OwnerTable;
                int   colindex = _TC.ColIndex;

                TableColumn tc;
                tc = (TableColumn)(t.TableColumns.Items[colindex]);
                x  = tc.GetXPosition(rpt);
            }
            else if (wc.MC != null)
            {                   // must be part of a matrix
                x = wc.MC.XPosition;
            }
            else
            {
                ReportItems ris = this.Parent as ReportItems;
                x = ris.GetXOffset(rpt);
            }

            return(x);
        }
Esempio n. 3
0
        internal Rectangle(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r,p,xNode)
        {
            _ReportItems=null;
            _PageBreakAtStart=false;
            _PageBreakAtEnd=false;

            // 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 "PageBreakAtStart":
                        _PageBreakAtStart = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
                        break;
                    case "PageBreakAtEnd":
                        _PageBreakAtEnd = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
                        break;
                    default:
                        if (ReportItemElement(xNodeLoop))	// try at ReportItem level
                            break;
                        // don't know this element - log it
                        OwnerReport.rl.LogError(4, "Unknown Rectangle element " + xNodeLoop.Name + " ignored.");
                        break;
                }
            }
        }
Esempio n. 4
0
        ReportItems _ReportItems; // Report items contained within the bounds of the rectangle.

        #endregion Fields

        #region Constructors

        // constructor that doesn't process syntax
        internal Rectangle(ReportDefn r, ReportLink p, XmlNode xNode, bool bNoLoop)
            : base(r,p,xNode)
        {
            _ReportItems=null;
            _PageBreakAtStart=false;
            _PageBreakAtEnd=false;
        }
        string _TableSyntax;        //  syntax for the table position; table contains {x} items holding a
                                    //   spot for each _ris;
        public TablePositioner(Report rpt, ReportItems ris)
        {
            _rpt = rpt;
            _ris = ris;
            _values = new string[ris.Items.Count];

            _TableSyntax = BuildTable();
        }
Esempio n. 6
0
        string _TableSyntax;        //  syntax for the table position; table contains {x} items holding a
                                    //   spot for each _ris;
        public TablePositioner(Report rpt, ReportItems ris)
        {
            _rpt    = rpt;
            _ris    = ris;
            _values = new string[ris.Items.Count];

            _TableSyntax = BuildTable();
        }
Esempio n. 7
0
        internal CustomReportItem(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p, xNode, false)
        {
            _Type = null;
            ReportItems ris       = null;
            bool        bVersion2 = true;

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

                case "ReportItems":                                 // Version 1 of the specification
                    ris       = new ReportItems(r, this, xNodeLoop);
                    bVersion2 = false;
                    break;

                case "AltReportItem":           // Verstion 2 of the specification
                    ris = new ReportItems(r, this, xNodeLoop);
                    break;

                case "CustomProperties":
                    _Properties = CustomProperties(xNodeLoop);
                    break;

                default:
                    if (ReportItemElement(xNodeLoop))                                   // try at ReportItem level
                    {
                        break;
                    }
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown CustomReportItem element " + xNodeLoop.Name + " ignored.");
                    break;
                }
            }
            ReportItems = ris;
            if (bVersion2 && ris != null)
            {
                if (ris.Items.Count != 1)
                {
                    OwnerReport.rl.LogError(8, "Only one element is allowed within an AltReportItem.");
                }
            }

            if (_Type == null)
            {
                OwnerReport.rl.LogError(8, "CustomReportItem requires the Type element.");
            }
        }
Esempio n. 8
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.");
            }
        }
Esempio n. 9
0
        ReportItems _ReportItems; // An element of the report layout (e.g. List, Textbox,

        #endregion Fields

        #region Constructors

        internal TableCell(ReportDefn r, ReportLink p, XmlNode xNode, int colIndex)
            : base(r, p)
        {
            _ColIndex = colIndex;
            _ReportItems=null;
            _ColSpan=1;

            // 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 "ColSpan":
                        _ColSpan = XmlUtil.Integer(xNodeLoop.InnerText);
                        break;
                    default:
                        // don't know this element - log it
                        OwnerReport.rl.LogError(4, "Unknown TableCell element '" + xNodeLoop.Name + "' ignored.");
                        break;
                }
            }
            // Must have exactly one ReportItems
            if (_ReportItems == null)
                OwnerReport.rl.LogError(8, "ReportItems element is required with a TableCell but not specified.");
            else if (_ReportItems.Items.Count != 1)
                OwnerReport.rl.LogError(8, "Only one element in ReportItems element is allowed within a TableCell.");

            // Obtain the tablecell's owner table;
            //		determine if tablecell is part of table header
            _InTableHeader = false;
            ReportLink rl;
            for (rl=this.Parent; rl != null; rl=rl.Parent)
            {
                if (rl is Table)
                {
                    _OwnerTable = (Table) rl;
                    break;
                }

                if (rl is Header && rl.Parent is Table)	// Header and parent is Table (not TableGroup)
                {
                    _InTableHeader=true;
                }

                if (rl is Footer && rl.Parent is Table)	// Header and parent is Table (not TableGroup)
                {
                    _InTableFooter=true;
                }
            }
            return;
        }
Esempio n. 10
0
        List <Textbox> _GrowList;               // list of TextBox's that need to be checked for growth

        internal List(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p, xNode)
        {
            _Grouping                  = null;
            _Sorting                   = null;
            _ReportItems               = null;
            _DataInstanceName          = "Item";
            _DataInstanceElementOutput = DataInstanceElementOutputEnum.Output;

            // 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 "ReportItems":
                    _ReportItems = new ReportItems(r, this, xNodeLoop);
                    break;

                case "DataInstanceName":
                    _DataInstanceName = xNodeLoop.InnerText;
                    break;

                case "DataInstanceElementOutput":
                    _DataInstanceElementOutput = fyiReporting.RDL.DataInstanceElementOutput.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 List element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
            }
            DataRegionFinish();                                 // Tidy up the DataRegion
        }
Esempio n. 11
0
        Style _Style;                   // Style information for the page footer

        internal PageFooter(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            _Height           = null;
            _PrintOnFirstPage = false;
            _PrintOnLastPage  = false;
            _ReportItems      = null;
            _Style            = null;

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

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

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

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

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

                default:
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown PageFooter element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
            }
            if (_Height == null)
            {
                OwnerReport.rl.LogError(8, "PageFooter Height is required.");
            }
        }
Esempio n. 12
0
        Style _Style;                 // Default style information for the body

        internal Body(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            _ReportItems   = null;
            _Height        = null;
            _Columns       = 1;
            _ColumnSpacing = null;
            _Style         = null;

            // 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);                                 // need a class for this
                    break;

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

                case "Columns":
                    _Columns = XmlUtil.Integer(xNodeLoop.InnerText);
                    break;

                case "ColumnSpacing":
                    _ColumnSpacing = new RSize(r, xNodeLoop);
                    break;

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

                default:
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown Body element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
            }
            if (_Height == null)
            {
                OwnerReport.rl.LogError(8, "Body Height not specified.");
            }
        }
Esempio n. 13
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.");
            }
        }
        string _Type; // The type of the custom report item. Interpreted by a

        #endregion Fields

        #region Constructors

        internal CustomReportItem(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p, xNode, false)
        {
            _Type=null;
            ReportItems ris=null;
            bool bVersion2 = true;

            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "Type":
                        _Type = xNodeLoop.InnerText;
                        break;
                    case "ReportItems":         // Version 1 of the specification
                        ris = new ReportItems(r, this, xNodeLoop);
                        bVersion2 = false;
                        break;
                    case "AltReportItem":       // Verstion 2 of the specification
                        ris = new ReportItems(r, this, xNodeLoop);
                        break;
                    case "CustomProperties":
                        _Properties = CustomProperties(xNodeLoop);
                        break;
                    default:
                        if (ReportItemElement(xNodeLoop))	// try at ReportItem level
                            break;
                        // don't know this element - log it
                        OwnerReport.rl.LogError(4, "Unknown CustomReportItem element " + xNodeLoop.Name + " ignored.");
                        break;
                }
            }
            ReportItems = ris;
            if (bVersion2 && ris != null)
            {
                if (ris.Items.Count != 1)
                    OwnerReport.rl.LogError(8, "Only one element is allowed within an AltReportItem.");
            }

            if (_Type == null)
                OwnerReport.rl.LogError(8, "CustomReportItem requires the Type element.");
        }
Esempio n. 15
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.");
		}
Esempio n. 16
0
        Sorting _Sorting; // The expressions to sort the repeated list regions by

        #endregion Fields

        #region Constructors

        internal List(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r,p,xNode)
        {
            _Grouping=null;
            _Sorting=null;
            _ReportItems=null;
            _DataInstanceName="Item";
            _DataInstanceElementOutput=DataInstanceElementOutputEnum.Output;

            // 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 "ReportItems":
                        _ReportItems = new ReportItems(r, this, xNodeLoop);
                        break;
                    case "DataInstanceName":
                        _DataInstanceName = xNodeLoop.InnerText;
                        break;
                    case "DataInstanceElementOutput":
                        _DataInstanceElementOutput = fyiReporting.RDL.DataInstanceElementOutput.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 List element '" + xNodeLoop.Name + "' ignored.");
                        break;
                }
            }
            DataRegionFinish();			// Tidy up the DataRegion
        }
Esempio n. 17
0
		ReportItems _ReportItems;	// The report items contained in each detail cell of the matrix layout.
						// This ReportItems collection must contain exactly one
						// ReportItem. The Top, Left, Height and Width for this
						// ReportItem are ignored. The position is taken to be 0,
						// 0 and the size to be 100%, 100%.		
	
		internal MatrixCell(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
		{
			_ReportItems=null;

			// 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;
					default:
						break;
				}
			}
			if (_ReportItems == null)
				OwnerReport.rl.LogError(8, "MatrixCell requires the ReportItems element.");
		}
Esempio n. 18
0
		ReportItems _ReportItems;	// The region that contains the elements of the corner layout
									// This ReportItems collection must contain exactly
									// one ReportItem. The Top, Left, Height and Width
									// for this ReportItem are ignored. The position is
									// taken to be 0, 0 and the size to be 100%, 100%.		
	
		internal Corner(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
		{
			_ReportItems=null;

			// 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;	
					default:	
						// don't know this element - log it
						OwnerReport.rl.LogError(4, "Unknown Corner element '" + xNodeLoop.Name + "' ignored.");
						break;
				}
			}
		}
Esempio n. 19
0
        Style _Style; // Style information for the page header

        #endregion Fields

        #region Constructors

        internal PageHeader(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _Height=null;
            _PrintOnFirstPage=false;
            _PrintOnLastPage=false;
            _ReportItems=null;
            _Style=null;

            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "Height":
                        _Height = new RSize(r, xNodeLoop);
                        break;
                    case "PrintOnFirstPage":
                        _PrintOnFirstPage = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
                        break;
                    case "PrintOnLastPage":
                        _PrintOnLastPage = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
                        break;
                    case "ReportItems":
                        _ReportItems = new ReportItems(r, this, xNodeLoop);
                        break;
                    case "Style":
                        _Style = new Style(r, this, xNodeLoop);
                        break;
                    default:
                        // don't know this element - log it
                        OwnerReport.rl.LogError(4, "Unknown PageHeader element '" + xNodeLoop.Name + "' ignored.");
                        break;
                }
            }
            if (_Height == null)
                OwnerReport.rl.LogError(8, "PageHeader Height is required.");
        }
Esempio n. 20
0
		Style _Style;		// Default style information for the body	
		
		internal Body(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
		{
			_ReportItems = null;
			_Height = null;
			_Columns = 1;
			_ColumnSpacing=null;
			_Style=null;

			// 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);	// need a class for this
						break;
					case "Height":
						_Height = new RSize(r, xNodeLoop);
						break;
					case "Columns":
						_Columns = XmlUtil.Integer(xNodeLoop.InnerText);
						break;
					case "ColumnSpacing":
						_ColumnSpacing = new RSize(r, xNodeLoop);
						break;
					case "Style":
						_Style = new Style(r, this, xNodeLoop);
						break;
					default:	
						// don't know this element - log it
						OwnerReport.rl.LogError(4, "Unknown Body element '" + xNodeLoop.Name + "' ignored.");
						break;
				}
			}
			if (_Height == null)
				OwnerReport.rl.LogError(8, "Body Height not specified.");
		}
Esempio n. 21
0
        internal Rectangle(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p, xNode)
        {
            _ReportItems      = null;
            _PageBreakAtStart = false;
            _PageBreakAtEnd   = false;

            // 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 "PageBreakAtStart":
                    _PageBreakAtStart = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

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

                default:
                    if (ReportItemElement(xNodeLoop))                                   // try at ReportItem level
                    {
                        break;
                    }
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown Rectangle element " + xNodeLoop.Name + " ignored.");
                    break;
                }
            }
        }
Esempio n. 22
0
File: Subtotal.cs Progetto: mnisl/OD
		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. 23
0
        ReportItems _ReportItems;               // The region that contains the elements of the corner layout
        // This ReportItems collection must contain exactly
        // one ReportItem. The Top, Left, Height and Width
        // for this ReportItem are ignored. The position is
        // taken to be 0, 0 and the size to be 100%, 100%.

        internal Corner(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            _ReportItems = null;

            // 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;

                default:
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown Corner element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
            }
        }
Esempio n. 24
0
        bool _PageBreakAtEnd;                   // Indicates the report should page break at the end of the rectangle.

        // constructor that doesn't process syntax
        internal Rectangle(ReportDefn r, ReportLink p, XmlNode xNode, bool bNoLoop) : base(r, p, xNode)
        {
            _ReportItems      = null;
            _PageBreakAtStart = false;
            _PageBreakAtEnd   = false;
        }
Esempio n. 25
0
        bool _InTableFooter;                    // true if tablecell is part of footer; simplifies HTML processing

        internal TableCell(ReportDefn r, ReportLink p, XmlNode xNode, int colIndex) : base(r, p)
        {
            _ColIndex    = colIndex;
            _ReportItems = null;
            _ColSpan     = 1;

            // 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 "ColSpan":
                    _ColSpan = XmlUtil.Integer(xNodeLoop.InnerText);
                    break;

                default:
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown TableCell element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
            }
            // Must have exactly one ReportItems
            if (_ReportItems == null)
            {
                OwnerReport.rl.LogError(8, "ReportItems element is required with a TableCell but not specified.");
            }
            else if (_ReportItems.Items.Count != 1)
            {
                OwnerReport.rl.LogError(8, "Only one element in ReportItems element is allowed within a TableCell.");
            }

            // Obtain the tablecell's owner table;
            //		determine if tablecell is part of table header
            _InTableHeader = false;
            ReportLink rl;

            for (rl = this.Parent; rl != null; rl = rl.Parent)
            {
                if (rl is Table)
                {
                    _OwnerTable = (Table)rl;
                    break;
                }

                if (rl is Header && rl.Parent is Table)                 // Header and parent is Table (not TableGroup)
                {
                    _InTableHeader = true;
                }

                if (rl is Footer && rl.Parent is Table)                 // Header and parent is Table (not TableGroup)
                {
                    _InTableFooter = true;
                }
            }
            return;
        }