Exemplo n.º 1
0
Arquivo: SortBy.cs Projeto: mnisl/OD
			SortDirectionEnum _Direction;	// Indicates the direction of the sort
										// 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.");
		}
Exemplo n.º 2
0
		Expression _Label;	// (string) The label displayed on the legend.		
	
		internal DynamicSeries(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.String);
						break;
					default:
						break;
				}
			}
			if (_Grouping == null)
				OwnerReport.rl.LogError(8, "DynamicSeries requires the Grouping element.");
			if (_Label == null)
				OwnerReport.rl.LogError(8, "DynamicSeries requires the Label element.");
		}
Exemplo n.º 3
0
Arquivo: Action.cs Projeto: mnisl/OD
		Expression _BookmarkLink;	// (string)
								//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;
				}
			}
		}
Exemplo n.º 4
0
		Expression _Bottom;	//(Size) Width of the bottom border. Max: 20 pt Min: 0.25 pt
	
		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;
				}
			}
		}
Exemplo n.º 5
0
		internal bool DataRegionElement(XmlNode xNodeLoop)
		{
			switch (xNodeLoop.Name)
			{
				case "KeepTogether":
					_KeepTogether = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
					break;
				case "NoRows":
					_NoRows = new Expression(OwnerReport, this, xNodeLoop, ExpressionType.String);
					break;
				case "DataSetName":
					_DataSetName = xNodeLoop.InnerText;
					break;
				case "PageBreakAtStart":
					_PageBreakAtStart = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
					break;
				case "PageBreakAtEnd":
					_PageBreakAtEnd = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
					break;
				case "Filters":
					_Filters = new Filters(OwnerReport, this, xNodeLoop);
					break;
				default:	// Will get many that are handled by the specific
							//  type of data region: ie  list,chart,matrix,table
					if (ReportItemElement(xNodeLoop))	// try at ReportItem level
						break;
					return false;
			}
			return true;
		}
Exemplo n.º 6
0
		Expression _Label;		// Label (string) for the value to display in the UI
								// 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;
				}
			}
		

		}
Exemplo n.º 7
0
		string _ToggleItem;		// The name of the textbox used to
					// 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;
				}
			}
		}
Exemplo n.º 8
0
		DataPoint _DataPoint;	// The data point that generated this
		internal ChartExpression(ReportDefn r, ReportLink p, XmlNode xNode):base(r,p,xNode)
		{
			_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;
					case "DataPoint":
						_DataPoint = (DataPoint) this.OwnerReport.LUDynamicNames[xNodeLoop.InnerText];
						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;
				}
			}
		}
Exemplo n.º 9
0
		TitlePositionEnum _Position;	// The position of the title; Default: center
	
		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;
				}
			}
		}
Exemplo n.º 10
0
		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 = fyiReporting.RDL.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.");
				}
			}
		}
Exemplo n.º 11
0
		DataRegion _ParentDataRegion;	// when DataRegions are nested; the nested regions have the parent set 
	
		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;
		}
Exemplo n.º 12
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;
                }
            }
        }
Exemplo n.º 13
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 = fyiReporting.RDL.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;
            }
        }
Exemplo n.º 14
0
 internal ChartBase(Report r, Row row, Chart c, MatrixCellEntry[,] m, Expression showTooltips, Expression showTooltipsX, Expression _ToolTipYFormat, Expression _ToolTipXFormat)
 {
     this._ChartDefn = c;
       this._row = row;
       this._DataDefn = m;
       this._bm = null;
       int width = this._ChartDefn.WidthCalc(r, null);
       int height = RSize.PixelsFromPoints(this._ChartDefn.HeightOrOwnerHeight);
       this.Layout = new ChartLayout(width, height);
       this._SeriesBrush = null;
       this._SeriesMarker = null;
       this._showToolTips = showTooltips.EvaluateBoolean(r, row);
       this._showToolTipsX = showTooltipsX.EvaluateBoolean(r, row);
       this._tooltipYFormat = _ToolTipYFormat.EvaluateString(r, row);
       this._tooltipXFormat = _ToolTipXFormat.EvaluateString(r, row);
 }
Exemplo n.º 15
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.");
        }
Exemplo n.º 16
0
        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.");
            }
        }
Exemplo n.º 17
0
        internal Subreport(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p, xNode)
        {
            _ReportName=null;
            _Parameters=null;
            _NoRows=null;
            _MergeTransactions=true;
            _SubReportGetContent = r.SubReportGetContent;

            // 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
        }
Exemplo n.º 18
0
        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 = fyiReporting.RDL.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.");
        }
Exemplo n.º 19
0
		Expression _Value;	// (Variant) Value expression. Same restrictions as
							//  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.");
		}
Exemplo n.º 20
0
		Expression _Label;	//(Variant) The label for the static member (displayed either on
							// 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.");
		}
Exemplo n.º 21
0
		string _Prompt;			// The prompt displayed to the user when
								// 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 = String.IsNullOrWhiteSpace (r.OverwriteConnectionString) 
						? new Expression(r, this, xNodeLoop, ExpressionType.String)
						: new Expression(r, this, r.OverwriteConnectionString, 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.");
		}
Exemplo n.º 22
0
		bool _ConstantImage;	// true if constant image
	
		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.");
			
		}
Exemplo n.º 23
0
		Expression _InitialState;	//(Boolean)
					//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.");
		}
Exemplo n.º 24
0
		int _Rotation;	// Angle of rotation of the label text		
	
		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;
				}
			}
		

		}
Exemplo n.º 25
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 = fyiReporting.RDL.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;
		}
Exemplo n.º 26
0
		bool _InMatrix;		// true if reportitem is in a matrix
		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;
				}
			}
		}
Exemplo n.º 27
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 = fyiReporting.RDL.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) + "'.");
		}
Exemplo n.º 28
0
		Expression _Expression;			// 

		internal GroupExpression(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
		{
			_Expression = new Expression(r,this,xNode,ExpressionType.Variant);
		}
Exemplo n.º 29
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;            
 }
Exemplo n.º 30
0
 Expression _Value;          // value of the property
 internal CustomProperty(Expression name, Expression val)
 {
     _Name = name;
     _Value = val;
 }
Exemplo n.º 31
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 = RDL.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;
            }
        }