Пример #1
0
        DataElementOutputEnum _DataElementOutput;               // Indicates whether the data point should
        // appear in a data rendering.

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

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

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

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

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

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

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

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

                default:
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown DataPoint element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
            }
            if (_DataValues == null)
            {
                OwnerReport.rl.LogError(8, "ChartSeries requires the DataValues element.");
            }
        }
Пример #2
0
        Expression _YAxis; //140208 GJL Added for left/Right YAxis Support

        #endregion Fields

        #region Constructors

        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;
                }
            }
        }
Пример #3
0
        Expression _YAxis;      //140208 GJL Added for left/Right YAxis Support
        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;

                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;
                }
            }
        }
Пример #4
0
        Style _Style; // Defines border and background style

        #endregion Fields

        #region Constructors

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

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