Пример #1
0
        List<ChartSeries> _Items; // list of chart series

        #endregion Fields

        #region Constructors

        internal ChartData(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            ChartSeries cs;
            _Items = new List<ChartSeries>();
            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "ChartSeries":
                        cs = new ChartSeries(r, this, xNodeLoop);
                        break;
                    default:
                        cs=null;		// don't know what this is
                        // don't know this element - log it
                        OwnerReport.rl.LogError(4, "Unknown ChartData element '" + xNodeLoop.Name + "' ignored.");
                        break;
                }
                if (cs != null)
                    _Items.Add(cs);
            }
            if (_Items.Count == 0)
                OwnerReport.rl.LogError(8, "For ChartData at least one ChartSeries is required.");
            else
                _Items.TrimExcess();
        }
Пример #2
0
        List<DataValue> _Items; // list of DataValue

        #endregion Fields

        #region Constructors

        internal DataValues(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            DataValue dv;
            _Items = new List<DataValue>();
            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "DataValue":
                        dv = new DataValue(r, this, xNodeLoop);
                        break;
                    default:
                        dv=null;		// don't know what this is
                        // don't know this element - log it
                        OwnerReport.rl.LogError(4, "Unknown DataValues element '" + xNodeLoop.Name + "' ignored.");
                        break;
                }
                if (dv != null)
                    _Items.Add(dv);
            }
            if (_Items.Count == 0)
                OwnerReport.rl.LogError(8, "For DataValues at least one DataValue is required.");
            else
                _Items.TrimExcess();
        }
Пример #3
0
        string _ToggleItem; // The name of the textbox used to

        #endregion Fields

        #region Constructors

        // hide/unhide this report item. Clicking on
        //an instance of the ToggleItem will toggle
        //the hidden state of every corresponding
        //instance of this item. If the Toggle item
        //becomes hidden, this item should become
        //hidden.
        //Must be a textbox in the same grouping
        //scope as this item or in any containing (ancestor) grouping scope
        //If omitted, no item will toggle the hidden
        //state of this item.
        //Not allowed on and cannot refer to report
        //items contained in a page header or
        //footer.
        //Cannot refer to a report item contained
        //within the current report item unless
        //current grouping scope has a Parent.
        internal Visibility(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _Hidden=null;
            _ToggleItem=null;

            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "Hidden":
                        _Hidden = new Expression(r, this, xNodeLoop, ExpressionType.Boolean);
                        break;
                    case "ToggleItem":
                        _ToggleItem = xNodeLoop.InnerText;
                        break;
                    default:
                        // don't know this element - log it
                        OwnerReport.rl.LogError(4, "Unknown Visibility element '" + xNodeLoop.Name + "' ignored.");
                        break;
                }
            }
        }
        List<GroupExpression> _Items; // list of GroupExpression

        #endregion Fields

        #region Constructors

        internal GroupExpressions(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            GroupExpression g;
            _Items = new List<GroupExpression>();
            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "GroupExpression":
                        g = new GroupExpression(r, this, xNodeLoop);
                        break;
                    default:
                        g=null;		// don't know what this is
                        // don't know this element - log it
                        OwnerReport.rl.LogError(4, "Unknown GroupExpressions element '" + xNodeLoop.Name + "' ignored.");
                        break;
                }
                if (g != null)
                    _Items.Add(g);
            }
            if (_Items.Count == 0)
                OwnerReport.rl.LogError(8, "GroupExpressions require at least one GroupExpression be defined.");
            else
                _Items.TrimExcess();
        }
Пример #5
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;
        }
Пример #6
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;
                }
            }
        }
Пример #7
0
        Style _Style; // Line style properties for the gridlines and tickmarks

        #endregion Fields

        #region Constructors

        internal ChartGridLines(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _ShowGridLines=true;
            _Style=null;

            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "ShowGridLines":
                        _ShowGridLines = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
                        break;
                    case "Style":
                        _Style = new Style(r, this, xNodeLoop);
                        break;
                    default:	// TODO
                        // don't know this element - log it
                        OwnerReport.rl.LogError(4, "Unknown ChartGridLines element '" + xNodeLoop.Name + "' ignored.");
                        break;
                }
            }
        }
Пример #8
0
        List<SeriesGrouping> _Items; // list of SeriesGrouping

        #endregion Fields

        #region Constructors

        internal SeriesGroupings(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            SeriesGrouping sg;
            _Items = new List<SeriesGrouping>();
            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "SeriesGrouping":
                        sg = new SeriesGrouping(r, this, xNodeLoop);
                        break;
                    default:
                        sg=null;		// don't know what this is
                        break;
                }
                if (sg != null)
                    _Items.Add(sg);
            }
            if (_Items.Count == 0)
                OwnerReport.rl.LogError(8, "For SeriesGroupings at least one SeriesGrouping is required.");
            else
                _Items.TrimExcess();
        }
Пример #9
0
        MarkerTypeEnum _Type; // Defines the marker type for values. Default: none

        #endregion Fields

        #region Constructors

        //  properties for the marker(s).
        internal Marker(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _Type=MarkerTypeEnum.None;
            _Size=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 "Type":
                        _Type = MarkerType.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
                        break;
                    case "Size":
                        _Size = new RSize(r, xNodeLoop);
                        break;
                    case "Style":
                        _Style = new Style(r, this, xNodeLoop);
                        break;
                    default:
                        break;
                }
            }
        }
Пример #10
0
        StaticColumns _StaticColumns; // Static column headings for this grouping

        #endregion Fields

        #region Constructors

        internal ColumnGrouping(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _Height=null;
            _DynamicColumns=null;
            _StaticColumns=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 "DynamicColumns":
                        _DynamicColumns = new DynamicColumns(r, this, xNodeLoop);
                        break;
                    case "StaticColumns":
                        _StaticColumns = new StaticColumns(r, this, xNodeLoop);
                        break;
                    default:
                        break;
                }
            }
            if (_Height == null)
                OwnerReport.rl.LogError(8, "ColumnGrouping requires the Height element to be specified.");

            if ((_DynamicColumns != null && _StaticColumns != null) ||
                (_DynamicColumns == null && _StaticColumns == null))
                OwnerReport.rl.LogError(8, "ColumnGrouping requires either the DynamicColumns element or StaticColumns element but not both.");
        }
Пример #11
0
        MatrixCells _MatrixCells; // The set of cells in a row in the detail section of the Matrix.

        #endregion Fields

        #region Constructors

        internal MatrixRow(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _Height=null;
            _MatrixCells=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 "MatrixCells":
                        _MatrixCells = new MatrixCells(r, this, xNodeLoop);
                        break;
                    default:
                        break;
                }
            }
            if (_MatrixCells == null)
                OwnerReport.rl.LogError(8, "MatrixRow requires the MatrixCells element.");
        }
Пример #12
0
        List<Filter> _Items; // list of Filter

        #endregion Fields

        #region Constructors

        internal Filters(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            Filter f;
            _Items = new List<Filter>();
            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "Filter":
                        f = new Filter(r, this, xNodeLoop);
                        break;
                    default:
                        f=null;		// don't know what this is
                        // don't know this element - log it
                        OwnerReport.rl.LogError(4, "Unknown Filters element '" + xNodeLoop.Name + "' ignored.");
                        break;
                }
                if (f != null)
                    _Items.Add(f);
            }
            if (_Items.Count == 0)
                OwnerReport.rl.LogError(8, "Filters require at least one Filter be defined.");
            else
                _Items.TrimExcess();
        }
Пример #13
0
        Style _Style; // border and background properties for series legend itmes and data points

        #endregion Fields

        #region Constructors

        //   when dynamic exprs are evaluated per group instance
        internal SeriesGrouping(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _DynamicSeries=null;
            _StaticSeries=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 "DynamicSeries":
                        _DynamicSeries = new DynamicSeries(r, this, xNodeLoop);
                        break;
                    case "StaticSeries":
                        _StaticSeries = new StaticSeries(r, this, xNodeLoop);
                        break;
                    case "Style":
                        _Style = new Style(OwnerReport, this, xNodeLoop);
                        OwnerReport.rl.LogError(4, "Style element in SeriesGrouping is currently ignored."); // TODO
                        break;
                    default:
                        // don't know this element - log it
                        OwnerReport.rl.LogError(4, "Unknown SeriesGrouping element '" + xNodeLoop.Name + "' ignored.");
                        break;
                }
            }
        }
Пример #14
0
        StaticCategories _StaticCategories; // Category headings for this grouping

        #endregion Fields

        #region Constructors

        internal CategoryGrouping(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _DynamicCategories=null;
            _StaticCategories=null;

            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "DynamicCategories":
                        _DynamicCategories = new DynamicCategories(r, this, xNodeLoop);
                        break;
                    case "StaticCategories":
                        _StaticCategories = new StaticCategories(r, this, xNodeLoop);
                        break;
                    default:
                        // don't know this element - log it
                        OwnerReport.rl.LogError(4, "Unknown CategoryGrouping element '" + xNodeLoop.Name + "' ignored.");
                        break;
                }
            }
            if ((_DynamicCategories == null && _StaticCategories == null) ||
                (_DynamicCategories != null && _StaticCategories != null))
                OwnerReport.rl.LogError(8, "CategoryGrouping requires either DynamicCategories element or StaticCategories element, but not both.");
        }
Пример #15
0
        List<QueryParameter> _Items; // list of QueryParameter

        #endregion Fields

        #region Constructors

        internal QueryParameters(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _ContainsArray = false;
            QueryParameter q;
            _Items = new List<QueryParameter>();
            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "QueryParameter":
                        q = new QueryParameter(r, this, xNodeLoop);
                        break;
                    default:
                        q=null;		// don't know what this is
                        // don't know this element - log it
                        OwnerReport.rl.LogError(4, "Unknown QueryParameters element '" + xNodeLoop.Name + "' ignored.");
                        break;
                }
                if (q != null)
                    _Items.Add(q);
            }
            if (_Items.Count == 0)
                OwnerReport.rl.LogError(8, "For QueryParameters at least one QueryParameter is required.");
            else
                _Items.TrimExcess();
        }
Пример #16
0
        TableRows _TableRows; // The header rows for the table or group

        #endregion Fields

        #region Constructors

        // each page that the table (or group) is displayed
        internal Header(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _TableRows=null;
            _RepeatOnNewPage=false;

            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "TableRows":
                        _TableRows = new TableRows(r, this, xNodeLoop);
                        break;
                    case "RepeatOnNewPage":
                        _RepeatOnNewPage = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
                        break;
                    default:
                        break;
                }
            }
            if (_TableRows == null)
                OwnerReport.rl.LogError(8, "Header requires the TableRows element.");
        }
Пример #17
0
        List<SortBy> _Items; // list of SortBy

        #endregion Fields

        #region Constructors

        internal Sorting(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            SortBy s;
            _Items = new List<SortBy>();
            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "SortBy":
                        s = new SortBy(r, this, xNodeLoop);
                        break;
                    default:
                        s=null;		// don't know what this is
                        // don't know this element - log it
                        OwnerReport.rl.LogError(4, "Unknown Sorting element '" + xNodeLoop.Name + "' ignored.");
                        break;
                }
                if (s != null)
                    _Items.Add(s);
            }
            if (_Items.Count == 0)
                OwnerReport.rl.LogError(8, "Sorting requires at least one SortBy be defined.");
            else
                _Items.TrimExcess();
        }
Пример #18
0
        List<TableGroup> _Items; // list of TableGroup entries

        #endregion Fields

        #region Constructors

        internal TableGroups(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            TableGroup tg;
            _Items = new List<TableGroup>();
            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "TableGroup":
                        tg = new TableGroup(r, this, xNodeLoop);
                        break;
                    default:
                        tg=null;		// don't know what this is
                        // don't know this element - log it
                        OwnerReport.rl.LogError(4, "Unknown TableGroups element '" + xNodeLoop.Name + "' ignored.");
                        break;
                }
                if (tg != null)
                    _Items.Add(tg);
            }
            if (_Items.Count == 0)
                OwnerReport.rl.LogError(8, "For TableGroups at least one TableGroup is required.");
            else
                _Items.TrimExcess();
        }
Пример #19
0
        TableRows _TableRows; // The footer rows for the table or group

        #endregion Fields

        #region Constructors

        // each page that the table (or group) is displayed
        internal Footer(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _TableRows=null;
            _RepeatOnNewPage=false;

            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "TableRows":
                        _TableRows = new TableRows(r, this, xNodeLoop);
                        break;
                    case "RepeatOnNewPage":
                        _RepeatOnNewPage = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
                        break;
                    default:
                        // don't know this element - log it
                        OwnerReport.rl.LogError(4, "Unknown Footer element '" + xNodeLoop.Name + "' ignored.");
                        break;
                }
            }
            if (_TableRows == null)
                OwnerReport.rl.LogError(8, "TableRows element is required with a Footer but not specified.");
        }
Пример #20
0
        Expression _Hyperlink; // (URL)An expression that evaluates to the URL of the hyperlink

        #endregion Fields

        #region Constructors

        //An expression that evaluates to the ID of a
        //bookmark within the report to go to when this
        //report item is clicked on.
        //(If no bookmark with this ID is found, the link
        //will not be included in the report. If the
        //bookmark is hidden, the link will go to the start
        //of the page the bookmark is on. If multiple
        //bookmarks with this ID are found, the link will
        //go to the first one)
        // Constructor
        internal Action(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _Hyperlink = null;
            _Drillthrough = null;
            _BookmarkLink = null;

            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "Hyperlink":
                        _Hyperlink = new Expression(r, this, xNodeLoop, ExpressionType.URL);
                        break;
                    case "Drillthrough":
                        _Drillthrough = new Drillthrough(r, this, xNodeLoop);
                        break;
                    case "BookmarkLink":
                        _BookmarkLink = new Expression(r, this, xNodeLoop, ExpressionType.String);
                        break;
                    default:
                        break;
                }
            }
        }
Пример #21
0
        List<TableCell> _Items; // list of TableCell

        #endregion Fields

        #region Constructors

        internal TableCells(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            TableCell tc;
            _Items = new List<TableCell>();
            // Loop thru all the child nodes
            int colIndex=0;			// keep track of the column numbers
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "TableCell":
                        tc = new TableCell(r, this, xNodeLoop, colIndex);
                        colIndex += tc.ColSpan;
                        break;
                    default:
                        tc=null;		// don't know what this is
                        // don't know this element - log it
                        OwnerReport.rl.LogError(4, "Unknown TableCells element '" + xNodeLoop.Name + "' ignored.");
                        break;
                }
                if (tc != null)
                    _Items.Add(tc);
            }
            if (_Items.Count > 0)
                _Items.TrimExcess();
        }
Пример #22
0
        List<StaticMember> _Items; // list of StaticMember

        #endregion Fields

        #region Constructors

        internal StaticCategories(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            StaticMember sm;
            _Items = new List<StaticMember>();
            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "StaticMember":
                        sm = new StaticMember(r, this, xNodeLoop);
                        break;
                    default:
                        sm=null;		// don't know what this is
                        // don't know this element - log it
                        OwnerReport.rl.LogError(4, "Unknown StaticCategories element '" + xNodeLoop.Name + "' ignored.");
                        break;
                }
                if (sm != null)
                    _Items.Add(sm);
            }
            if (_Items.Count == 0)
                OwnerReport.rl.LogError(8, "For StaticCategories at least one StaticMember is required.");
            else
                _Items.TrimExcess();
        }
Пример #23
0
        RSize _Width; // Width of the row header

        #endregion Fields

        #region Constructors

        internal RowGrouping(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _Width=null;
            _DynamicRows=null;
            _StaticRows=null;

            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "Width":
                        _Width = new RSize(r, xNodeLoop);
                        break;
                    case "DynamicRows":
                        _DynamicRows = new DynamicRows(r, this, xNodeLoop);
                        break;
                    case "StaticRows":
                        _StaticRows = new StaticRows(r, this, xNodeLoop);
                        break;
                    default:
                        // don't know this element - log it
                        OwnerReport.rl.LogError(4, "Unknown RowGrouping element '" + xNodeLoop.Name + "' ignored.");
                        break;
                }
            }
            if (_Width == null)
                OwnerReport.rl.LogError(8, "RowGrouping requires the Width element.");
        }
Пример #24
0
        List<CodeModule> _Items; // list of code module

        #endregion Fields

        #region Constructors

        internal CodeModules(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _Items = new List<CodeModule>();
            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                if (xNodeLoop.Name == "CodeModule")
                {
                    CodeModule cm = new CodeModule(r, this, xNodeLoop);
                    _Items.Add(cm);
                }
                else
                {
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown CodeModules element '" + xNodeLoop.Name + "' ignored.");
                }
            }
            if (_Items.Count == 0)
                OwnerReport.rl.LogError(8, "For CodeModules at least one CodeModule is required.");
            else
                _Items.TrimExcess();
        }
Пример #25
0
        string _ReportName; // URL The path of the drillthrough report. Paths may be

        #endregion Fields

        #region Constructors

        internal Drillthrough(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _ReportName=null;
            _DrillthroughParameters=null;

            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "ReportName":
                        _ReportName = xNodeLoop.InnerText;
                        break;
                    case "Parameters":
                        _DrillthroughParameters = new DrillthroughParameters(r, this, xNodeLoop);
                        break;
                    default:
                        break;
                }
            }
            if (_ReportName == null)
                OwnerReport.rl.LogError(8, "Drillthrough requires the ReportName element.");
        }
Пример #26
0
        List<MatrixRow> _Items; // list of MatrixRow

        #endregion Fields

        #region Constructors

        internal MatrixRows(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            MatrixRow m;
            _Items = new List<MatrixRow>();
            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "MatrixRow":
                        m = new MatrixRow(r, this, xNodeLoop);
                        break;
                    default:
                        m=null;		// don't know what this is
                        // don't know this element - log it
                        OwnerReport.rl.LogError(4, "Unknown MatrixRows element '" + xNodeLoop.Name + "' ignored.");
                        break;
                }
                if (m != null)
                    _Items.Add(m);
            }
            if (_Items.Count == 0)
                OwnerReport.rl.LogError(8, "For MatrixRows at least one MatrixRow is required.");
            else
                _Items.TrimExcess();
        }
        List<SubreportParameter> _Items; // list of SubreportParameter

        #endregion Fields

        #region Constructors

        internal SubReportParameters(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            SubreportParameter rp;
            _Items = new List<SubreportParameter>();
            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "Parameter":
                        rp = new SubreportParameter(r, this, xNodeLoop);
                        break;
                    default:
                        rp=null;		// don't know what this is
                        // don't know this element - log it
                        OwnerReport.rl.LogError(4, "Unknown SubreportParameters element '" + xNodeLoop.Name + "' ignored.");
                        break;
                }
                if (rp != null)
                    _Items.Add(rp);
            }
            if (_Items.Count > 0)
                _Items.TrimExcess();
        }
        Sorting _Sorting; // The expressions to sort the data by

        #endregion Fields

        #region Constructors

        internal DynamicCategories(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _Grouping=null;
            _Sorting=null;
            _Label=null;

            // 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 "Label":
                        _Label = new Expression(r, this, xNodeLoop, ExpressionType.Variant);
                        break;
                    default:
                        break;
                }
            }
            if (_Grouping == null)
                OwnerReport.rl.LogError(8, "DynamicCategories requires the Grouping element.");
        }
Пример #29
0
        Expression _Top; //(Size) Width of the top border. Max: 20 pt Min: 0.25 pt

        #endregion Fields

        #region Constructors

        internal StyleBorderWidth(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _Default=null;
            _Left=null;

            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "Default":
                        _Default = new Expression(r, this, xNodeLoop, ExpressionType.ReportUnit);
                        break;
                    case "Left":
                        _Left = new Expression(r, this, xNodeLoop, ExpressionType.ReportUnit);
                        break;
                    case "Right":
                        _Right = new Expression(r, this, xNodeLoop, ExpressionType.ReportUnit);
                        break;
                    case "Top":
                        _Top = new Expression(r, this, xNodeLoop, ExpressionType.ReportUnit);
                        break;
                    case "Bottom":
                        _Bottom = new Expression(r, this, xNodeLoop, ExpressionType.ReportUnit);
                        break;
                    default:
                        // don't know this element - log it
                        OwnerReport.rl.LogError(4, "Unknown BorderWidth element '" + xNodeLoop.Name + "' ignored.");
                        break;
                }
            }
        }
Пример #30
0
 internal RowGroupings(ReportDefn r, ReportLink p, XmlNode xNode)
     : base(r, p)
 {
     RowGrouping g;
     _Items = new List<RowGrouping>();
     // Loop thru all the child nodes
     foreach(XmlNode xNodeLoop in xNode.ChildNodes)
     {
         if (xNodeLoop.NodeType != XmlNodeType.Element)
             continue;
         switch (xNodeLoop.Name)
         {
             case "RowGrouping":
                 g = new RowGrouping(r, this, xNodeLoop);
                 break;
             default:
                 g=null;		// don't know what this is
                 // don't know this element - log it
                 OwnerReport.rl.LogError(4, "Unknown RowGroupings element '" + xNodeLoop.Name + "' ignored.");
                 break;
         }
         if (g != null)
             _Items.Add(g);
     }
     if (_Items.Count == 0)
         OwnerReport.rl.LogError(8, "For RowGroupings at least one RowGrouping is required.");
     else
     {
         _Items.TrimExcess();
         _StaticCount = GetStaticCount();
     }
 }
Пример #31
0
        internal ColumnGroupings(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            ColumnGrouping g;

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

                default:
                    g = null;                                   // don't know what this is
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown ColumnGroupings element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
                if (g != null)
                {
                    _Items.Add(g);
                }
            }
            if (_Items.Count == 0)
            {
                OwnerReport.rl.LogError(8, "For ColumnGroups at least one ColumnGrouping is required.");
            }
            else
            {
                _Items.TrimExcess();
                _StaticCount = GetStaticCount();
            }
        }
Пример #32
0
        List <TableColumn> _Items;                       // list of TableColumn

        internal TableColumns(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            TableColumn tc;

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

                default:
                    tc = null;                                          // don't know what this is
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown TableColumns element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
                if (tc != null)
                {
                    _Items.Add(tc);
                }
            }
            if (_Items.Count == 0)
            {
                OwnerReport.rl.LogError(8, "For TableColumns at least one TableColumn is required.");
            }
            else
            {
                _Items.TrimExcess();
            }
        }
Пример #33
0
        List <GroupExpression> _Items;                   // list of GroupExpression

        internal GroupExpressions(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            GroupExpression g;

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

                default:
                    g = null;                                   // don't know what this is
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown GroupExpressions element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
                if (g != null)
                {
                    _Items.Add(g);
                }
            }
            if (_Items.Count == 0)
            {
                OwnerReport.rl.LogError(8, "GroupExpressions require at least one GroupExpression be defined.");
            }
            else
            {
                _Items.TrimExcess();
            }
        }
Пример #34
0
        List <ChartSeries> _Items;                       // list of chart series

        internal ChartData(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            ChartSeries cs;

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

                default:
                    cs = null;                                          // don't know what this is
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown ChartData element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
                if (cs != null)
                {
                    _Items.Add(cs);
                }
            }
            if (_Items.Count == 0)
            {
                OwnerReport.rl.LogError(8, "For ChartData at least one ChartSeries is required.");
            }
            else
            {
                _Items.TrimExcess();
            }
        }
Пример #35
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;
                }
            }
        }
Пример #36
0
        StaticRows _StaticRows;   // Static row headings for this grouping

        internal RowGrouping(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            _Width       = null;
            _DynamicRows = null;
            _StaticRows  = null;

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

                case "DynamicRows":
                    _DynamicRows = new DynamicRows(r, this, xNodeLoop);
                    break;

                case "StaticRows":
                    _StaticRows = new StaticRows(r, this, xNodeLoop);
                    break;

                default:
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown RowGrouping element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
            }
            if (_Width == null)
            {
                OwnerReport.rl.LogError(8, "RowGrouping requires the Width element.");
            }
        }
Пример #37
0
        List <MatrixCell> _Items;                        // list of MatrixCell

        internal MatrixCells(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            MatrixCell m;

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

                default:
                    m = null;                                   // don't know what this is
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown MatrixCells element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
                if (m != null)
                {
                    _Items.Add(m);
                }
            }
            if (_Items.Count == 0)
            {
                OwnerReport.rl.LogError(8, "For MatrixCells at least one MatrixCell is required.");
            }
            else
            {
                _Items.TrimExcess();
            }
        }
Пример #38
0
        List <Filter> _Items;                    // list of Filter

        internal Filters(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            Filter f;

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

                default:
                    f = null;                                   // don't know what this is
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown Filters element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
                if (f != null)
                {
                    _Items.Add(f);
                }
            }
            if (_Items.Count == 0)
            {
                OwnerReport.rl.LogError(8, "Filters require at least one Filter be defined.");
            }
            else
            {
                _Items.TrimExcess();
            }
        }
Пример #39
0
        List <StaticMember> _Items;                      // list of StaticMember

        internal StaticSeries(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            StaticMember sm;

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

                default:
                    sm = null;                                          // don't know what this is
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown StaticSeries element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
                if (sm != null)
                {
                    _Items.Add(sm);
                }
            }
            if (_Items.Count == 0)
            {
                OwnerReport.rl.LogError(8, "For StaticSeries at least one StaticMember is required.");
            }
            else
            {
                _Items.TrimExcess();
            }
        }
Пример #40
0
        List <DataPoint> _Items;                 // list of datapoint

        internal DataPoints(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            DataPoint dp;

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

                default:
                    dp = null;                                          // don't know what this is
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown DataPoints element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
                if (dp != null)
                {
                    _Items.Add(dp);
                }
            }
            if (_Items.Count == 0)
            {
                OwnerReport.rl.LogError(8, "For DataPoints at least one DataPoint is required.");
            }
            else
            {
                _Items.TrimExcess();
            }
        }
Пример #41
0
        List <SortBy> _Items;                    // list of SortBy

        internal Sorting(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            SortBy s;

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

                default:
                    s = null;                                   // don't know what this is
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown Sorting element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
                if (s != null)
                {
                    _Items.Add(s);
                }
            }
            if (_Items.Count == 0)
            {
                OwnerReport.rl.LogError(8, "Sorting requires at least one SortBy be defined.");
            }
            else
            {
                _Items.TrimExcess();
            }
        }
Пример #42
0
        bool _FixedHeader = false;      // Header of this column should be display even when scrolled

        internal TableColumn(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            _Width      = null;
            _Visibility = null;

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

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

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

                default:
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown TableColumn element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
            }
            if (_Width == null)
            {
                OwnerReport.rl.LogError(8, "TableColumn requires the Width element.");
            }
        }
Пример #43
0
        List <TableCell> _Items;                 // list of TableCell

        internal TableCells(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            TableCell tc;

            _Items = new List <TableCell>();
            // Loop thru all the child nodes
            int colIndex = 0;                           // keep track of the column numbers

            foreach (XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                {
                    continue;
                }
                switch (xNodeLoop.Name)
                {
                case "TableCell":
                    tc        = new TableCell(r, this, xNodeLoop, colIndex);
                    colIndex += tc.ColSpan;
                    break;

                default:
                    tc = null;                                          // don't know what this is
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown TableCells element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
                if (tc != null)
                {
                    _Items.Add(tc);
                }
            }
            if (_Items.Count > 0)
            {
                _Items.TrimExcess();
            }
        }
        Expression _Label;              //(Variant) The label displayed on the axis.

        internal DynamicCategories(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            _Grouping = null;
            _Sorting  = null;
            _Label    = null;

            // 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 "Label":
                    _Label = new Expression(r, this, xNodeLoop, ExpressionType.Variant);
                    break;

                default:
                    break;
                }
            }
            if (_Grouping == null)
            {
                OwnerReport.rl.LogError(8, "DynamicCategories requires the Grouping element.");
            }
        }
Пример #45
0
        RSize _Width;                   // Width of each detail cell in this column

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

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

                default:
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown MatrixColumn element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
            }
        }
Пример #46
0
        Axis _Axis;                     // Display properties for the category axis

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

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

                default:
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown CategoryAxis element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
            }
        }
Пример #47
0
        List <SeriesGrouping> _Items;                    // list of SeriesGrouping

        internal SeriesGroupings(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            SeriesGrouping sg;

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

                default:
                    sg = null;                                          // don't know what this is
                    break;
                }
                if (sg != null)
                {
                    _Items.Add(sg);
                }
            }
            if (_Items.Count == 0)
            {
                OwnerReport.rl.LogError(8, "For SeriesGroupings at least one SeriesGrouping is required.");
            }
            else
            {
                _Items.TrimExcess();
            }
        }
Пример #48
0
        Name _InstanceName;                     // The name of the variable to assign the class to.
        // This variable can be used in expressions
        // throughout the report.

        internal ReportClass(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            _ClassName    = null;
            _InstanceName = null;

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

                case "InstanceName":
                    _InstanceName = new Name(xNodeLoop.InnerText);
                    break;

                default:
                    break;
                }
            }
            if (_ClassName == null)
            {
                OwnerReport.rl.LogError(8, "Class ClassName is required but not specified.");
            }

            if (_InstanceName == null)
            {
                OwnerReport.rl.LogError(8, "Class InstanceName is required but not specified or invalid for " + _ClassName == null? "<unknown name>": _ClassName);
            }
        }
Пример #49
0
        List <Textbox> _HideDuplicates;         // holds any textboxes that use this as a hideduplicate scope

        internal DataSetDefn(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            _Name                = null;
            _Fields              = null;
            _Query               = null;
            _CaseSensitivity     = TrueFalseAutoEnum.True;
            _Collation           = null;
            _AccentSensitivity   = TrueFalseAutoEnum.False;
            _KanatypeSensitivity = TrueFalseAutoEnum.False;
            _WidthSensitivity    = TrueFalseAutoEnum.False;
            _Filters             = null;
            _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 "Fields":
                    _Fields = new Fields(r, this, xNodeLoop);
                    break;

                case "Query":
                    _Query = new Query(r, this, xNodeLoop);
                    break;

                case "Rows":                            // Extension !!!!!!!!!!!!!!!!!!!!!!!
                case "fyi:Rows":
                    _XmlRowData = "<?xml version='1.0' encoding='UTF-8'?><Rows>" + xNodeLoop.InnerXml + "</Rows>";
                    foreach (XmlAttribute xA in xNodeLoop.Attributes)
                    {
                        if (xA.Name == "File")
                        {
                            _XmlRowFile = xA.Value;
                        }
                    }
                    break;

                case "CaseSensitivity":
                    _CaseSensitivity = TrueFalseAuto.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

                case "Collation":
                    _Collation = xNodeLoop.InnerText;
                    break;

                case "AccentSensitivity":
                    _AccentSensitivity = TrueFalseAuto.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

                case "KanatypeSensitivity":
                    _KanatypeSensitivity = TrueFalseAuto.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

                case "WidthSensitivity":
                    _WidthSensitivity = TrueFalseAuto.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

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

                default:
                    OwnerReport.rl.LogError(4, "Unknown DataSet element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
            }
            if (this.Name != null)
            {
                OwnerReport.LUAggrScope.Add(this.Name.Nm, this);                                // add to referenceable TextBoxes
            }
            else
            {
                OwnerReport.rl.LogError(4, "Name attribute must be specified in a DataSet.");
            }

            if (_Query == null)
            {
                OwnerReport.rl.LogError(8, "Query element must be specified in a DataSet.");
            }
        }
Пример #50
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;
        }
Пример #51
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 = Engine.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
            }
        }
Пример #52
0
        bool _CanOmit = false;    // When display values don't fit, is it OK to drop some from display

        internal Axis(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            _Visible        = false;
            _Style          = null;
            _Title          = null;
            _Title2         = null;// 20022008 AJM GJL
            _Margin         = false;
            _MajorTickMarks = AxisTickMarksEnum.None;
            _MinorTickMarks = AxisTickMarksEnum.None;
            _MajorGridLines = null;
            _MinorGridLines = null;
            _MajorInterval  = null;
            _MinorInterval  = null;
            _Reverse        = false;
            _CrossAt        = 0;
            _Interlaced     = false;
            _Scalar         = false;
            _Min            = null;
            _Max            = null;
            _LogScale       = false;
            _Month          = false; //12052008 WP

            // Loop thru all the child nodes
            foreach (XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                {
                    continue;
                }
                switch (xNodeLoop.Name)
                {
                case "Visible":
                    _Visible = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

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

                case "Title":
                    _Title = new Title(r, this, xNodeLoop);
                    break;

                // 20022008 AJM GJL - Second Y axis
                case "Title2":
                case "fyi:Title2":
                    _Title2 = new Title(r, this, xNodeLoop);
                    break;

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

                case "MajorTickMarks":
                    _MajorTickMarks = AxisTickMarks.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

                case "MinorTickMarks":
                    _MinorTickMarks = AxisTickMarks.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

                case "MajorGridLines":
                    _MajorGridLines = new ChartGridLines(r, this, xNodeLoop);
                    break;

                case "MinorGridLines":
                    _MinorGridLines = new ChartGridLines(r, this, xNodeLoop);
                    break;

                case "MajorInterval":
                    _MajorInterval = new Expression(OwnerReport, this, xNodeLoop, ExpressionType.Integer);
                    OwnerReport.rl.LogError(4, "Axis element MajorInterval is currently ignored.");
                    break;

                case "MinorInterval":
                    _MinorInterval = new Expression(OwnerReport, this, xNodeLoop, ExpressionType.Integer);
                    OwnerReport.rl.LogError(4, "Axis element MinorInterval is currently ignored.");
                    break;

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

                case "CrossAt":
                    _CrossAt = XmlUtil.Integer(xNodeLoop.InnerText);
                    break;

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

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

                case "Min":
                    _Min = new Expression(OwnerReport, this, xNodeLoop, ExpressionType.Integer);
                    break;

                case "Max":
                    _Max = new Expression(OwnerReport, this, xNodeLoop, ExpressionType.Integer);
                    break;

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

                case "Month":
                case "fyi:Month":
                    _Month = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

                case "fyi:CanOmit":
                    _CanOmit = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

                default:
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown Axis element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
            }
        }
Пример #53
0
		TrueFalseAutoEnum _UsedInQuery; // Enum True | False | Auto (default)
		//	Indicates whether or not the parameter is
		//	used in a query in the report. This is
		//	needed to determine if the queries need
		//	to be re-executed if the parameter
		//	changes. Auto indicates the
		//	UsedInQuery setting should be
		//	autodetected as follows: True if the
		//	parameter is referenced in any query
		//	value expression.		
	
		internal ReportParameter(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
		{
			_Name=null;
			_dt = TypeCode.Object;
			_Nullable = false;
			_DefaultValue=null;
			_AllowBlank=false;
			_Prompt=null;
			_ValidValues=null;
			_UsedInQuery = TrueFalseAutoEnum.Auto;
			// 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 "DataType":
						_dt = DataType.GetStyle(xNodeLoop.InnerText, this.OwnerReport);
						_NumericType = DataType.IsNumeric(_dt);
						break;
					case "Nullable":
						_Nullable = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
						break;
					case "DefaultValue":
						_DefaultValue = new DefaultValue(r, this, xNodeLoop);
						break;
					case "AllowBlank":
						_AllowBlank = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
						break;
					case "Prompt":
						_Prompt = xNodeLoop.InnerText;
						break;
					case "Hidden":
						_Hidden = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
						OwnerReport.rl.LogError(4, "ReportParameter element Hidden is currently ignored.");	// TODO
						break;
					case "MultiValue":
						_MultiValue = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
						break;
					case "ValidValues":
						_ValidValues = new ValidValues(r, this, xNodeLoop);
						break;
					case "UsedInQuery":
						_UsedInQuery = TrueFalseAuto.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
						break;
					default:	
						// don't know this element - log it
						OwnerReport.rl.LogError(4, "Unknown ReportParameter element '" + xNodeLoop.Name + "' ignored.");
						break;
				}
			}
			if (_Name == null)
				OwnerReport.rl.LogError(8, "ReportParameter name is required but not specified.");

			if (_dt == TypeCode.Object)
				OwnerReport.rl.LogError(8, string.Format("ReportParameter DataType is required but not specified or invalid for {0}.", _Name==null? "<unknown name>": _Name.Nm));
		}
Пример #54
0
        static readonly Regex HTMLEXPR = new Regex("(<expr>.+</expr>)");     // Split on all expressions.

        internal Textbox(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p, xNode)
        {
            _Value            = null;
            _CanGrow          = false;
            _CanShrink        = false;
            _HideDuplicates   = null;
            _ToggleImage      = null;
            _DataElementStyle = DataElementStyleEnum.Auto;

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

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

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

                case "HideDuplicates":
                    _HideDuplicates = xNodeLoop.InnerText;
                    break;

                case "ToggleImage":
                    _ToggleImage = new ToggleImage(r, this, xNodeLoop);
                    break;

                case "DataElementStyle":
                    _DataElementStyle = Engine.DataElementStyle.GetStyle(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 Textbox element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
            }

            if (_Value == null)
            {
                OwnerReport.rl.LogError(8, "Textbox value not specified for " + (this.Name == null? "'name not specified'": this.Name.Nm));
            }

            if (this.Name != null)
            {
                try
                {
                    OwnerReport.LUReportItems.Add(this.Name.Nm, this); // add to referenceable TextBoxes
                }
                catch                                                  // Duplicate name
                {
                    OwnerReport.rl.LogError(4, "Duplicate Textbox name '" + this.Name.Nm + "' ignored.");
                }
            }
        }
Пример #55
0
        override internal void RunPage(Pages pgs, Row row)
        {
            Report r = pgs.Report;

            if (IsHidden(r, row))
            {
                return;
            }

            base.RunPage(pgs, row);

            // need to save the owner report and nest in this defintion
            ReportDefn   saveReport = r.ReportDefinition;
            NeedPassword np         = r.GetDataSourceReferencePassword; // get current password

            r.SetReportDefinition(_ReportDefn);
            r.Folder = _ReportDefn.ParseFolder;                         // folder needs to get set since the id of the report is used by the cache
            r.GetDataSourceReferencePassword = np;

            DataSourcesDefn saveDS = r.ParentConnections;

            if (this.MergeTransactions)
            {
                r.ParentConnections = saveReport.DataSourcesDefn;
            }
            else
            {
                r.ParentConnections = null;
            }

            r.SubreportDataRetrievalTriggerEvent();

            bool bRows = true;

            if (_Parameters == null)
            {                   // When no parameters we only retrieve data once
                SubreportWorkClass wc = r.Cache.Get(this, "report") as SubreportWorkClass;

                if (wc == null)
                {                                                                   // run report first time;
                    bRows = r.RunGetData(null);
                    if (!r.IsSubreportDataRetrievalDefined)                         // if use has defined subreportdataretrieval they might set data
                    {
                        r.Cache.Add(this, "report", new SubreportWorkClass(bRows)); // so we can't cache
                    }
                }
                else
                {
                    bRows = wc.bRows;
                }
            }
            else
            {
                SetSubreportParameters(r, row);                         // apply the parameters
                bRows = r.RunGetData(null);
            }

            SetPageLeft(r);                                     // Set the Left attribute since this will be the margin for this report

            SetPagePositionBegin(pgs);

            float yOffset;

            if (bRows)  // Only run subreport if have a row in some Dataset
            {
                //
                // Run the subreport -- this is the major effort in creating the display objects in the page
                //
                r.ReportDefinition.Body.RunPage(pgs);           // create a the subreport items
                yOffset = pgs.CurrentPage.YOffset;
            }
            else
            {   // Handle NoRows message
                string msg;
                if (this.NoRows != null)
                {
                    msg = this.NoRows.EvaluateString(pgs.Report, null);
                }
                else
                {
                    msg = null;
                }

                if (msg != null)
                {
                    PageText pt = new PageText(msg);
                    SetPagePositionAndStyle(pgs.Report, pt, null);

                    if (pt.SI.BackgroundImage != null)
                    {
                        pt.SI.BackgroundImage.H = pt.H;         //   and in the background image
                    }
                    pgs.CurrentPage.AddObject(pt);

                    yOffset = pt.Y + pt.H;
                }
                else
                {
                    yOffset = pgs.CurrentPage.YOffset;
                }
            }

            r.SetReportDefinition(saveReport);                                  // restore the current report
            r.ParentConnections = saveDS;                                       // restore the data connnections

            SetPagePositionEnd(pgs, yOffset);
        }
Пример #56
0
        internal ChartExpression(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p, xNode)
        {
            _Values = null;

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

                case "DataValues":
                    _Values = new DataValues(r, p, xNodeLoop);
                    break;

                case "DataPoint":
                    _DataPoint = (DataPoint)this.OwnerReport.LUDynamicNames[xNodeLoop.InnerText];
                    break;

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

                // 05122007AJM & GJL Added to store PlotType
                case "PlotType":
                    _PlotType = new Expression(OwnerReport, this, xNodeLoop, ExpressionType.Variant);
                    break;

                //140208 GJL Added for left/Right YAxis Support
                case "YAxis":
                    _YAxis = new Expression(OwnerReport, this, xNodeLoop, ExpressionType.String);
                    break;

                case "NoMarker":
                case "fyi:NoMarker":
                    _NoMarker = new Expression(OwnerReport, this, xNodeLoop, ExpressionType.String);
                    break;

                case "LineSize":
                case "fyi:LineSize":
                    _LineSize = new Expression(OwnerReport, this, xNodeLoop, ExpressionType.String);
                    break;

                case "fyi:Color":
                case "Color":
                case "Colour":
                    _Colour = new Expression(OwnerReport, this, xNodeLoop, ExpressionType.String);
                    break;

                default:
                    if (ReportItemElement(xNodeLoop))                                   // try at ReportItem level
                    {
                        break;
                    }
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown Chart element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
            }
        }
Пример #57
0
        internal Chart(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p, xNode)
        {
            _Type                   = ChartTypeEnum.Column;
            _Subtype                = new Expression(r, p, "Plain", ExpressionType.Enum); //AJM GJL 14082008 Allowing Expression
            _SeriesGroupings        = null;
            _CategoryGroupings      = null;
            _ChartData              = null;
            _Legend                 = null;
            _CategoryAxis           = null;
            _ValueAxis              = null;
            _Title                  = null;
            _PointWidth             = 0;
            _Palette                = new Expression(r, p, "Default", ExpressionType.Enum); //AJM GJL 14082008 Allowing Expression
            _ThreeDProperties       = null;
            _PlotArea               = null;
            _ChartElementOutput     = ChartElementOutputEnum.Output;
            _isHYNEsWonderfulVector = new Expression(r, p, "False", ExpressionType.Boolean);
            _showTooltips           = new Expression(r, p, "False", ExpressionType.Boolean);
            _showTooltipsX          = new Expression(r, p, "False", ExpressionType.Boolean);
            _ToolTipXFormat         = new Expression(r, p, "", ExpressionType.String);
            _ToolTipYFormat         = new Expression(r, p, "", ExpressionType.String);

            // Loop thru all the child nodes
            foreach (XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                {
                    continue;
                }
                switch (xNodeLoop.Name)
                {
                case "Type":
                    _Type = ChartType.GetStyle(xNodeLoop.InnerText);
                    if (_Type == ChartTypeEnum.Stock ||
                        _Type == ChartTypeEnum.Unknown)
                    {
                        OwnerReport.rl.LogError(8, "Chart type '" + xNodeLoop.InnerText + "' is not currently supported.");
                    }
                    break;

                case "Subtype":
                    _Subtype = new Expression(r, p, xNodeLoop, ExpressionType.Enum);     //AJM GJL 14082008
                    break;

                case "SeriesGroupings":
                    _SeriesGroupings = new SeriesGroupings(r, this, xNodeLoop);
                    break;

                case "CategoryGroupings":
                    _CategoryGroupings = new CategoryGroupings(r, this, xNodeLoop);
                    break;

                case "ChartData":
                    _ChartData = new ChartData(r, this, xNodeLoop);
                    break;

                case "Legend":
                    _Legend = new Legend(r, this, xNodeLoop);
                    break;

                case "CategoryAxis":
                    _CategoryAxis = new CategoryAxis(r, this, xNodeLoop);
                    break;

                case "ValueAxis":
                    _ValueAxis = new ValueAxis(r, this, xNodeLoop);
                    break;

                case "Title":
                    _Title = new Title(r, this, xNodeLoop);
                    break;

                case "PointWidth":
                    _PointWidth = XmlUtil.Integer(xNodeLoop.InnerText);
                    break;

                case "Palette":
                    _Palette = new Expression(r, p, xNodeLoop, ExpressionType.Enum);     //AJM GJL 14082008
                    break;

                case "ThreeDProperties":
                    _ThreeDProperties = new ThreeDProperties(r, this, xNodeLoop);
                    break;

                case "PlotArea":
                    _PlotArea = new PlotArea(r, this, xNodeLoop);
                    break;

                case "ChartElementOutput":
                    _ChartElementOutput = Engine.ChartElementOutput.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

                case "HyneWonderfulVector":     //AJM GJL 14082008
                case "RenderAsVector":
                case "fyi:RenderAsVector":
                    _isHYNEsWonderfulVector = new Expression(r, p, xNodeLoop, ExpressionType.Boolean);
                    break;

                case "fyi:tooltip":
                case "fyi:Tooltip":
                    _showTooltips = new Expression(r, p, xNodeLoop, ExpressionType.Boolean);
                    break;

                case "fyi:TooltipX":
                    _showTooltipsX = new Expression(r, p, xNodeLoop, ExpressionType.Boolean);
                    break;

                case "fyi:TooltipYFormat":
                    _ToolTipYFormat = new Expression(r, p, xNodeLoop, ExpressionType.Boolean);
                    break;

                case "fyi:TooltipXFormat":
                    _ToolTipXFormat = new Expression(r, p, xNodeLoop, ExpressionType.Boolean);
                    break;

                default:
                    if (DataRegionElement(xNodeLoop))                                   // try at DataRegion level
                    {
                        break;
                    }
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown Chart element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
            }
            DataRegionFinish();                                 // Tidy up the DataRegion

            if (_SeriesGroupings == null && _CategoryGroupings == null)
            {
                OwnerReport.rl.LogError(8, "Chart requires either the SeriesGroupings element or CategoryGroupings element or both.");
            }

            if (OwnerReport.rl.MaxSeverity > 4)     // if we already have severe error don't check for these additional issues
            {
                return;
            }

            // Do some specific checking based on the type of the Chart specified
            switch (_Type)
            {
            case ChartTypeEnum.Bubble:
                if (_ChartData == null ||
                    _ChartData.Items[0].Datapoints.Items[0].DataValues.Items.Count != 3)
                {
                    OwnerReport.rl.LogError(8, "Bubble charts require three DataPoints defined.");
                }
                break;

            case ChartTypeEnum.Scatter:
                if (_ChartData == null ||
                    _ChartData.Items[0].Datapoints.Items[0].DataValues.Items.Count != 2)
                {
                    OwnerReport.rl.LogError(8, "Scatter charts require two DataPoints defined.");
                }
                break;

            default:
                break;
            }
        }
Пример #58
0
        bool _FilterOperatorSingleRow;                  // false for Top/Bottom N and Percent; otherwise true
        internal Filter(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            _FilterExpression = null;
            _FilterOperator   = FilterOperatorEnum.Unknown;
            _FilterValues     = null;

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

                case "Operator":
                    _FilterOperator = Engine.FilterOperator.GetStyle(xNodeLoop.InnerText);
                    if (_FilterOperator == FilterOperatorEnum.Unknown)
                    {
                        OwnerReport.rl.LogError(8, "Unknown Filter operator '" + xNodeLoop.InnerText + "'.");
                    }
                    break;

                case "FilterValues":
                    _FilterValues = new FilterValues(r, this, xNodeLoop);
                    break;

                default:
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown Filter element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
            }
            if (_FilterExpression == null)
            {
                OwnerReport.rl.LogError(8, "Filter requires the FilterExpression element.");
            }
            if (_FilterValues == null)
            {
                OwnerReport.rl.LogError(8, "Filter requires the FilterValues element.");
                return;                         // some of the filter operator checks require values
            }
            _FilterOperatorSingleRow = true;
            switch (_FilterOperator)
            {
            case FilterOperatorEnum.Like:
            case FilterOperatorEnum.Equal:
            case FilterOperatorEnum.NotEqual:
            case FilterOperatorEnum.GreaterThan:
            case FilterOperatorEnum.GreaterThanOrEqual:
            case FilterOperatorEnum.LessThan:
            case FilterOperatorEnum.LessThanOrEqual:
                if (_FilterValues.Items.Count != 1)
                {
                    OwnerReport.rl.LogError(8, "Filter Operator requires exactly 1 FilterValue.");
                }
                break;

            case FilterOperatorEnum.TopN:
            case FilterOperatorEnum.BottomN:
            case FilterOperatorEnum.TopPercent:
            case FilterOperatorEnum.BottomPercent:
                _FilterOperatorSingleRow = false;
                if (_FilterValues.Items.Count != 1)
                {
                    OwnerReport.rl.LogError(8, "Filter Operator requires exactly 1 FilterValue.");
                }
                break;

            case FilterOperatorEnum.In:
                break;

            case FilterOperatorEnum.Between:
                if (_FilterValues.Items.Count != 2)
                {
                    OwnerReport.rl.LogError(8, "Filter Operator Between requires exactly 2 FilterValues.");
                }
                break;

            default:
                OwnerReport.rl.LogError(8, "Valid Filter operator must be specified.");
                break;
            }
        }
Пример #59
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 = 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 = Engine.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) + "'.");
            }
        }
Пример #60
0
        Expression _Expression;                         //

        internal GroupExpression(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            _Expression = new Expression(r, this, xNode, ExpressionType.Variant);
        }