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;
                }
            }
        }
Beispiel #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);
        }
        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.");
            }
        }
        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;
        }
Beispiel #5
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();
        }
        string[] _values; //  values for each report item

        #endregion Fields

        #region Constructors

        //   spot for each _ris;
        public TablePositioner(Report rpt, ReportItems ris)
        {
            _rpt = rpt;
            _ris = ris;
            _values = new string[ris.Items.Count];

            _TableSyntax = BuildTable();
        }
        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;
        }
Beispiel #8
0
        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.");
            }
        }
        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.");
            }
        }
        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.");
            }
        }
Beispiel #11
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.");
            }
        }
        Visibility _Visibility; // Indicates if all of the dynamic rows for this grouping

        #endregion Fields

        #region Constructors

        // 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.");
        }
Beispiel #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 = Engine.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.");
        }
Beispiel #15
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 = Engine.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
        }
        Style _Style; // Style information for the page footer

        #endregion Fields

        #region Constructors

        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.");
        }
Beispiel #17
0
        Style _Style; // Default style information for the body

        #endregion Fields

        #region Constructors

        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.");
        }
Beispiel #18
0
        ReportItems _ReportItems; // The elements of the row header layout

        #endregion Fields

        #region Constructors

        // 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 StaticRow(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, "StaticRow requires the ReportItems element.");
        }
Beispiel #19
0
        ReportItems _ReportItems; // The region that contains the elements of the corner layout

        #endregion Fields

        #region Constructors

        // 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;
                }
            }
        }
Beispiel #20
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;
                }
            }
        }
Beispiel #21
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.");
        }
Beispiel #22
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;
                }
            }
        }
Beispiel #23
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;
        }
Beispiel #24
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;
        }