Пример #1
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;
                }
            }
        }
Пример #2
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;
                }
            }
        }
        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;
                }
            }
        }
Пример #4
0
        Expression _SortExpression; // (Variant) The expression to sort the groups by.

        #endregion Fields

        #region Constructors

        // Ascending (Default) | Descending
        internal SortBy(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _SortExpression=null;
            _Direction=SortDirectionEnum.Ascending;

            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "SortExpression":
                        _SortExpression = new Expression(r, this, xNodeLoop, ExpressionType.Variant);
                        break;
                    case "Direction":
                        _Direction = SortDirection.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
                        break;
                    default:
                        // don't know this element - log it
                        OwnerReport.rl.LogError(4, "Unknown SortBy element '" + xNodeLoop.Name + "' ignored.");
                        break;
                }
            }
            if (_SortExpression == null)
                OwnerReport.rl.LogError(8, "SortBy requires the SortExpression element.");
        }
        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.");
        }
Пример #6
0
        Style _Style; // Defines text, border and background style

        #endregion Fields

        #region Constructors

        internal Title(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _Caption=null;
            _Style=null;
            _Position=TitlePositionEnum.Center;

            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "Caption":
                        _Caption = new Expression(r, this, xNodeLoop, ExpressionType.String);
                        break;
                    case "Style":
                        _Style = new Style(r, this, xNodeLoop);
                        break;
                    case "Position":
                        _Position = TitlePosition.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
                        break;
                    default:
                        // don't know this element - log it
                        OwnerReport.rl.LogError(4, "Unknown Title element '" + xNodeLoop.Name + "' ignored.");
                        break;
                }
            }
        }
Пример #7
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;
                }
            }
        }
Пример #8
0
        DataRegion _ParentDataRegion; // when DataRegions are nested; the nested regions have the parent set

        #endregion Fields

        #region Constructors

        internal DataRegion(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r,p,xNode)
        {
            _KeepTogether=false;
            _NoRows=null;
            _DataSetName=null;
            _DataSetDefn=null;
            _PageBreakAtStart=false;
            _PageBreakAtEnd=false;
            _Filters=null;
        }
Пример #9
0
        int _Timeout; // Number of seconds to allow the query to run before

        #endregion Fields

        #region Constructors

        internal Query(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _DataSourceName=null;
            _QueryCommandType=QueryCommandTypeEnum.Text;
            _CommandText=null;
            _QueryParameters=null;
            _Timeout=0;
            _RowLimit=0;

            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "DataSourceName":
                        _DataSourceName = xNodeLoop.InnerText;
                        break;
                    case "CommandType":
                        _QueryCommandType = Engine.QueryCommandType.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
                        break;
                    case "CommandText":
                        _CommandText = new Expression(r, this, xNodeLoop, ExpressionType.String);
                        break;
                    case "QueryParameters":
                        _QueryParameters = new QueryParameters(r, this, xNodeLoop);
                        break;
                    case "Timeout":
                        _Timeout = XmlUtil.Integer(xNodeLoop.InnerText);
                        break;
                    case "RowLimit":				// Extension of RDL specification
                        _RowLimit = XmlUtil.Integer(xNodeLoop.InnerText);
                        break;
                    default:
                        // don't know this element - log it
                        OwnerReport.rl.LogError(4, "Unknown Query element '" + xNodeLoop.Name + "' ignored.");
                        break;
                }	// end of switch
            }	// end of foreach

            // Resolve the data source name to the object
            if (_DataSourceName == null)
            {
                r.rl.LogError(8, "DataSourceName element not specified for Query.");
                return;
            }
        }
Пример #10
0
 internal ChartBase(Report r, Row row, Chart c, MatrixCellEntry[,] m, Expression showTooltips, Expression showTooltipsX, Expression _ToolTipYFormat, Expression _ToolTipXFormat)
 {
     _ChartDefn = c;
     _row = row;
     _DataDefn = m;
     _bm = null;
     int width = _ChartDefn.WidthCalc(r, null);
     int height = RSize.PixelsFromPoints(_ChartDefn.HeightOrOwnerHeight);
     Layout = new ChartLayout(width, height);
     _SeriesBrush = null;
     _SeriesMarker = null;
     _showToolTips = showTooltips.EvaluateBoolean(r, row);
     _showToolTipsX = showTooltipsX.EvaluateBoolean(r, row);
     _tooltipYFormat = _ToolTipYFormat.EvaluateString(r, row);
     _tooltipXFormat = _ToolTipXFormat.EvaluateString(r, row);
 }
Пример #11
0
        Expression _Value; // (Variant) An expression that evaluates to the value of

        #endregion Fields

        #region Constructors

        //  this field.  For example, =Fields!Price.Value+Fields!Tax.Value
        // The expression cannot contain aggregates or references to report items.
        internal Field(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _Name=null;
            _DataField=null;
            _Value=null;
            _ColumnNumber = -1;
            _Type = TypeCode.String;
            // 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 "DataField":
                        _DataField = xNodeLoop.InnerText;
                        break;
                    case "TypeName":		// Extension !!!!!!!!!!!!!!!!!
                    case "rd:TypeName":		// Microsoft Designer uses this extension
                        _Type = DataType.GetStyle(xNodeLoop.InnerText, this.OwnerReport);
                        break;
                    case "Value":
                        _Value = new Expression(r, this, xNodeLoop, ExpressionType.Variant);
                        break;
                    default:
                        // don't know this element - log it
                        OwnerReport.rl.LogError(4, "Unknown Field element '" + xNodeLoop.Name + "' ignored.");
                        break;
                }
            }
            if (_DataField != null && _Value != null)
                OwnerReport.rl.LogError(8, "Only DataField or Value may be specified in a Field element, not both.");
            else if (_DataField == null && _Value == null)
                OwnerReport.rl.LogError(8, "Either DataField or Value must be specified in a Field element.");
        }
        Expression _Value; // (Variant) An expression that evaluates to the value to

        #endregion Fields

        #region Constructors

        // hand in for the parameter to the Subreport.
        internal SubreportParameter(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _Name=null;
            _Value=null;
            // Run thru the attributes
            foreach(XmlAttribute xAttr in xNode.Attributes)
            {
                switch (xAttr.Name)
                {
                    case "Name":
                        _Name = new Name(xAttr.Value);
                        break;
                }
            }

            if (_Name == null)
            {	// Name is required for parameters
                OwnerReport.rl.LogError(8, "Parameter Name attribute required.");
            }

            // 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;
                    default:
                        // don't know this element - log it
                        OwnerReport.rl.LogError(4, "Unknown Subreport parameter element '" + xNodeLoop.Name + "' ignored.");
                        break;
                }
            }

            if (_Value == null)
            {	// Value is required for parameters
                OwnerReport.rl.LogError(8, "The Parameter Value element is required but was not specified.");
            }
        }
Пример #13
0
        Expression _Value; // See Source. Expected datatype is string or

        #endregion Fields

        #region Constructors

        internal Image(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r,p,xNode)
        {
            _ImageSource=ImageSourceEnum.Unknown;
            _Value=null;
            _MIMEType=null;
            _Sizing=ImageSizingEnum.AutoSize;
            _ConstantImage = false;

            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "Source":
                        _ImageSource = Engine.ImageSource.GetStyle(xNodeLoop.InnerText);
                        break;
                    case "Value":
                        _Value = new Expression(r, this, xNodeLoop, ExpressionType.Variant);
                        break;
                    case "MIMEType":
                        _MIMEType = new Expression(r, this, xNodeLoop, ExpressionType.String);
                        break;
                    case "Sizing":
                        _Sizing = ImageSizing.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 Image element " + xNodeLoop.Name + " ignored.");
                        break;
                }
            }
            if (_ImageSource==ImageSourceEnum.Unknown)
                OwnerReport.rl.LogError(8, "Image requires a Source element.");
            if (_Value == null)
                OwnerReport.rl.LogError(8, "Image requires the Value element.");
        }
Пример #14
0
        string _ReportName; // The full path (e.g. “/salesreports/orderdetails”) or

        #endregion Fields

        #region Constructors

        internal Subreport(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p, xNode)
        {
            _ReportName=null;
            _Parameters=null;
            _NoRows=null;
            _MergeTransactions=true;

            // 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":
                        _Parameters = new SubReportParameters(r, this, xNodeLoop);
                        break;
                    case "NoRows":
                        _NoRows = new Expression(r, this, xNodeLoop, ExpressionType.String);
                        break;
                    case "MergeTransactions":
                        _MergeTransactions = 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 Image element " + xNodeLoop.Name + " ignored.");
                        break;
                }
            }

            if (_ReportName == null)
                OwnerReport.rl.LogError(8, "Subreport requires the ReportName element.");

            OwnerReport.ContainsSubreport = true;	// owner report contains a subreport
        }
Пример #15
0
        Expression _Value; // (Variant) Value expression. Same restrictions as

        #endregion Fields

        #region Constructors

        //  the expressions in a matrix cell
        internal DataValue(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _Value=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;
                    default:
                        break;
                }
            }
            if (_Value == null)
                OwnerReport.rl.LogError(8, "DataValue requires the Value element.");
        }
Пример #16
0
        Expression _Label; //(Variant) The label for the static member (displayed either on

        #endregion Fields

        #region Constructors

        // the category axis or legend, as appropriate).
        internal StaticMember(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _Label=null;

            // 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.Variant);
                        break;
                    default:
                        break;
                }
            }
            if (_Label == null)
                OwnerReport.rl.LogError(8, "StaticMember requires the Label element.");
        }
        Expression _Value; // (string) See Source. Expected datatype is string or

        #endregion Fields

        #region Constructors

        internal StyleBackgroundImage(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _Source=StyleBackgroundImageSourceEnum.Unknown;
            _Value=null;
            _MIMEType=null;
            _BackgroundRepeat=null;
            _ConstantImage=false;

            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "Source":
                        _Source = StyleBackgroundImageSource.GetStyle(xNodeLoop.InnerText);
                        break;
                    case "Value":
                        _Value = new Expression(r, this, xNodeLoop, ExpressionType.String);
                        break;
                    case "MIMEType":
                        _MIMEType = new Expression(r, this, xNodeLoop, ExpressionType.String);
                        break;
                    case "BackgroundRepeat":
                        _BackgroundRepeat = new Expression(r, this, xNodeLoop, ExpressionType.Enum);
                        break;
                    default:
                        // don't know this element - log it
                        OwnerReport.rl.LogError(4, "Unknown BackgroundImage element '" + xNodeLoop.Name + "' ignored.");
                        break;
                }
            }
            if (_Source == StyleBackgroundImageSourceEnum.Unknown)
                OwnerReport.rl.LogError(8, "BackgroundImage requires the Source element.");
            if (_Value == null)
                OwnerReport.rl.LogError(8, "BackgroundImage requires the Value element.");
        }
        string _Prompt; // The prompt displayed to the user when

        #endregion Fields

        #region Constructors

        // prompting for database credentials for this data source.
        internal ConnectionProperties(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _DataProvider=null;
            _ConnectString=null;
            _IntegratedSecurity=false;
            _Prompt=null;

            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "DataProvider":
                        _DataProvider = xNodeLoop.InnerText;
                        break;
                    case "ConnectString":
                        _ConnectString = new Expression(r, this, xNodeLoop, ExpressionType.String);
                        break;
                    case "IntegratedSecurity":
                        _IntegratedSecurity = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
                        break;
                    case "Prompt":
                        _Prompt = xNodeLoop.InnerText;
                        break;
                    default:
                        // don't know this element - log it
                        OwnerReport.rl.LogError(4, "Unknown ConnectionProperties element '" + xNodeLoop.Name + "' ignored.");
                        break;
                }
            }
            if (_DataProvider == null)
                OwnerReport.rl.LogError(8, "ConnectionProperties DataProvider is required.");
            if (_ConnectString == null)
                OwnerReport.rl.LogError(8, "ConnectionProperties ConnectString is required.");
        }
Пример #19
0
        bool _Visible; // Whether the data label is displayed on the

        #endregion Fields

        #region Constructors

        internal DataLabel(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _Style=null;
            _Value=null;
            _Visible=false;
            _Position=DataLabelPositionEnum.Auto;
            _Rotation=0;

            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "Style":
                        _Style = new Style(r, this, xNodeLoop);
                        break;
                    case "Value":
                        _Value = new Expression(r, this, xNodeLoop, ExpressionType.Variant);
                        break;
                    case "Visible":
                        _Visible = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
                        break;
                    case "Position":
                        _Position = DataLabelPosition.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
                        break;
                    case "Rotation":
                        _Rotation = XmlUtil.Integer(xNodeLoop.InnerText);
                        break;
                    default:
                        break;
                }
            }
        }
Пример #20
0
        Expression _InitialState; //(Boolean)

        #endregion Fields

        #region Constructors

        //A Boolean expression, the value of which
        //determines the initial state of the toggle image.
        //True = “expanded” (i.e. a minus sign). False =
        //“collapsed” (i.e. a plus sign)
        internal ToggleImage(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _InitialState=null;

            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "InitialState":
                        _InitialState = new Expression(r, this, xNodeLoop, ExpressionType.Boolean);
                        break;
                    default:
                        // don't know this element - log it
                        OwnerReport.rl.LogError(4, "Unknown ToggleImage element '" + xNodeLoop.Name + "' ignored.");
                        break;
                }
            }
            if (_InitialState == null)
                OwnerReport.rl.LogError(8, "ToggleImage requires the InitialState element.");
        }
Пример #21
0
        Expression _Value; // Possible value (variant) for the parameter

        #endregion Fields

        #region Constructors

        // If not supplied, the _Value is used as the label. If
        // _Value not supplied, _Label is the empty string;
        internal ParameterValue(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _Value=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 "Value":
                        _Value = new Expression(r, this, xNodeLoop, ExpressionType.Variant);
                        break;
                    case "Label":
                        _Label = new Expression(r, this, xNodeLoop, ExpressionType.String);
                        break;
                    default:
                        break;
                }
            }
        }
Пример #22
0
        ValueAxis _ValueAxis; // Defines the value axis

        #endregion Fields

        #region Constructors

        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;
            }
        }
Пример #23
0
 internal ChartPie(Report r, Row row, Chart c, MatrixCellEntry[,] m, Expression showTooltips, Expression showTooltipsX,Expression _ToolTipYFormat, Expression _ToolTipXFormat)
     : base(r, row, c, m, showTooltips, showTooltipsX, _ToolTipYFormat, _ToolTipXFormat)
 {
 }
Пример #24
0
        int _ZIndex; // Drawing order of the report item within the

        #endregion Fields

        #region Constructors

        internal ReportItem(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _Name=null;
            _Style=null;
            _Action=null;
            _Top=null;
            _Left=null;
            _Height=null;
            _Width=null;
            _ZIndex=0;
            _Visibility=null;
            _ToolTip=null;
            _Label=null;
            _LinkToChild=null;
            _Bookmark=null;
            _RepeatWith=null;
            _Custom=null;
            _DataElementName=null;
            _DataElementOutput=DataElementOutputEnum.Auto;
            // Run thru the attributes
            foreach(XmlAttribute xAttr in xNode.Attributes)
            {
                switch (xAttr.Name)
                {
                    case "Name":
                        _Name = new Name(xAttr.Value);
                        break;
                }
            }
        }
Пример #25
0
        Expression _Value; // value of the property

        #endregion Fields

        #region Constructors

        internal CustomProperty(Expression name, Expression val)
        {
            _Name = name;
            _Value = val;
        }
Пример #26
0
 CustomProperty CustomProperty(XmlNode xNode)
 {
     Expression name=null;
     Expression val=null;
     CustomProperty cp = null;
     foreach (XmlNode xNodeLoop in xNode.ChildNodes)
     {
         switch (xNodeLoop.Name)
         {
             case "Name":
                 name = new Expression(OwnerReport, this, xNodeLoop, ExpressionType.String);
                 break;
             case "Value":
                 val = new Expression(OwnerReport, this, xNodeLoop, ExpressionType.Variant);
                 break;
             default:
                 OwnerReport.rl.LogError(4, "Unknown CustomProperty element " + xNodeLoop.Name + " ignored.");
                 break;
         }
     }
     if (name == null || val == null)
         OwnerReport.rl.LogError(8, "CustomProperty requires the Name and Value element.");
     else
     {
         cp = new CustomProperty(name, val);
     }
     return cp;
 }
Пример #27
0
 internal bool ReportItemElement(XmlNode xNodeLoop)
 {
     switch (xNodeLoop.Name)
     {
         case "Style":
             _Style = new Style(OwnerReport, this, xNodeLoop);
             break;
         case "Action":
             _Action = new Action(OwnerReport, this, xNodeLoop);
             break;
         case "Top":
             _Top = new RSize(OwnerReport, xNodeLoop);
             break;
         case "Left":
             _Left = new RSize(OwnerReport, xNodeLoop);
             break;
         case "Height":
             _Height = new RSize(OwnerReport, xNodeLoop);
             break;
         case "Width":
             _Width = new RSize(OwnerReport, xNodeLoop);
             break;
         case "ZIndex":
             _ZIndex = XmlUtil.Integer(xNodeLoop.InnerText);
             break;
         case "Visibility":
             _Visibility = new Visibility(OwnerReport, this, xNodeLoop);
             break;
         case "ToolTip":
             _ToolTip = new Expression(OwnerReport, this, xNodeLoop, ExpressionType.String);
             break;
         case "Label":
             _Label = new Expression(OwnerReport, this, xNodeLoop, ExpressionType.Variant);
             break;
         case "LinkToChild":
             _LinkToChild = xNodeLoop.InnerText;
             break;
         case "Bookmark":
             _Bookmark = new Expression(OwnerReport, this, xNodeLoop, ExpressionType.String);
             break;
         case "RepeatWith":
             _RepeatWith = xNodeLoop.InnerText;
             break;
         case "Custom":
             _Custom = new Custom(OwnerReport, this, xNodeLoop);
             break;
         case "DataElementName":
             _DataElementName = xNodeLoop.InnerText;
             break;
         case "DataElementOutput":
             _DataElementOutput = Engine.DataElementOutput.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
             break;
         case "rd:DefaultName":
             break;      // MS tag: we don't use but don't want to generate a warning
         default:
             return false;	// Not a report item element
     }
     return true;
 }
Пример #28
0
        FilterValues _FilterValues; // The values to compare to the FilterExpression.

        #endregion Fields

        #region Constructors

        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;
            }
        }
Пример #29
0
        Expression _ParentGroup; //(Variant)

        #endregion Fields

        #region Constructors

        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) + "'.");
        }
Пример #30
0
        Expression _Expression; //

        #endregion Fields

        #region Constructors

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