List<StaticColumn> _Items;			// list of StaticColumn

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

		public TableCells(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
		{
			TableCell tc;
            _Items = new List<TableCell>();
			// Loop thru all the child nodes
			int colIndex=0;			// keep track of the column numbers
			foreach(XmlNode xNodeLoop in xNode.ChildNodes)
			{
				if (xNodeLoop.NodeType != XmlNodeType.Element)
					continue;
				switch (xNodeLoop.Name)
				{
					case "TableCell":
						tc = new TableCell(r, this, xNodeLoop, colIndex);
						colIndex += tc.ColSpan;
						break;
					default:	
						tc=null;		// don't know what this is
						// don't know this element - log it
						OwnerReport.rl.LogError(4, "Unknown TableCells element '" + xNodeLoop.Name + "' ignored.");
						break;
				}
				if (tc != null)
					_Items.Add(tc);
			}
			if (_Items.Count > 0)
                _Items.TrimExcess();
		}
		Name _InstanceName;		// The name of the variable to assign the class to.
								// This variable can be used in expressions
								// throughout the report.
	
		public ReportClass(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
		{
			_ClassName=null;
			_InstanceName = null;

			// Loop thru all the child nodes
			foreach(XmlNode xNodeLoop in xNode.ChildNodes)
			{
				if (xNodeLoop.NodeType != XmlNodeType.Element)
					continue;
				switch (xNodeLoop.Name)
				{
					case "ClassName":
						_ClassName = xNodeLoop.InnerText;
						break;
					case "InstanceName":
						_InstanceName = new Name(xNodeLoop.InnerText);
						break;
					default:
						break;
				}
			}
			if (_ClassName == null)
				OwnerReport.rl.LogError(8, "Class ClassName is required but not specified.");

			if (_InstanceName == null)
				OwnerReport.rl.LogError(8, "Class InstanceName is required but not specified or invalid for " + _ClassName==null? "<unknown name>": _ClassName);
		}
		StaticRows _StaticRows;	// Static row headings for this grouping		
	
		public RowGrouping(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
		{
			_Width=null;
			_DynamicRows=null;
			_StaticRows=null;

			// Loop thru all the child nodes
			foreach(XmlNode xNodeLoop in xNode.ChildNodes)
			{
				if (xNodeLoop.NodeType != XmlNodeType.Element)
					continue;
				switch (xNodeLoop.Name)
				{
					case "Width":
						_Width = new RSize(r, xNodeLoop);
						break;
					case "DynamicRows":
						_DynamicRows = new DynamicRows(r, this, xNodeLoop);
						break;
					case "StaticRows":
						_StaticRows = new StaticRows(r, this, xNodeLoop);
						break;
					default:	
						// don't know this element - log it
						OwnerReport.rl.LogError(4, "Unknown RowGrouping element '" + xNodeLoop.Name + "' ignored.");
						break;
				}
			}
			if (_Width == null)
				OwnerReport.rl.LogError(8, "RowGrouping requires the Width element.");
		}
		StaticCategories _StaticCategories;		// Category headings for this grouping		
	
		public CategoryGrouping(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
		{
			_DynamicCategories=null;
			_StaticCategories=null;

			// Loop thru all the child nodes
			foreach(XmlNode xNodeLoop in xNode.ChildNodes)
			{
				if (xNodeLoop.NodeType != XmlNodeType.Element)
					continue;
				switch (xNodeLoop.Name)
				{
					case "DynamicCategories":
						_DynamicCategories = new DynamicCategories(r, this, xNodeLoop);
						break;
					case "StaticCategories":
						_StaticCategories = new StaticCategories(r, this, xNodeLoop);
						break;
					default:	
						// don't know this element - log it
						OwnerReport.rl.LogError(4, "Unknown CategoryGrouping element '" + xNodeLoop.Name + "' ignored.");
						break;
				}
			}
			if ((_DynamicCategories == null && _StaticCategories == null) ||
				(_DynamicCategories != null && _StaticCategories != null))
				OwnerReport.rl.LogError(8, "CategoryGrouping requires either DynamicCategories element or StaticCategories element, but not both.");
		}
		Expression _Label;	// (string) The label displayed on the legend.		
	
		public 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.");
		}
Esempio n. 7
0
		bool _RepeatOnNewPage;	// Indicates this footer should be displayed on
								// each page that the table (or group) is displayed		
	
		public Footer(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
		{
			_TableRows=null;
			_RepeatOnNewPage=false;

			// Loop thru all the child nodes
			foreach(XmlNode xNodeLoop in xNode.ChildNodes)
			{
				if (xNodeLoop.NodeType != XmlNodeType.Element)
					continue;
				switch (xNodeLoop.Name)
				{
					case "TableRows":
						_TableRows = new TableRows(r, this, xNodeLoop);
						break;
					case "RepeatOnNewPage":
						_RepeatOnNewPage = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
						break;
					default:
						// don't know this element - log it
						OwnerReport.rl.LogError(4, "Unknown Footer element '" + xNodeLoop.Name + "' ignored.");
						break;
				}
			}
			if (_TableRows == null)
				OwnerReport.rl.LogError(8, "TableRows element is required with a Footer but not specified.");
		}
        bool _ContainsArray;                   // true if any of the parameters is an array reference

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

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

		}
Esempio n. 11
0
		public Rectangle(ReportDefn r, ReportLink p, XmlNode xNode):base(r,p,xNode)
		{
			_ReportItems=null;
			_PageBreakAtStart=false;
			_PageBreakAtEnd=false;

			// Loop thru all the child nodes
			foreach(XmlNode xNodeLoop in xNode.ChildNodes)
			{
				if (xNodeLoop.NodeType != XmlNodeType.Element)
					continue;
				switch (xNodeLoop.Name)
				{
					case "ReportItems":
						_ReportItems = new ReportItems(r, this, xNodeLoop);
						break;
					case "PageBreakAtStart":
						_PageBreakAtStart = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
						break;
					case "PageBreakAtEnd":
						_PageBreakAtEnd = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
						break;
					default:	
						if (ReportItemElement(xNodeLoop))	// try at ReportItem level
							break;
						// don't know this element - log it
						OwnerReport.rl.LogError(4, "Unknown Rectangle element " + xNodeLoop.Name + " ignored.");
						break;
				}
			}
		}
		Style _Style;			// Line style properties for the gridlines and tickmarks
		
		public ChartGridLines(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
		{
			_ShowGridLines=true;
			_Style=null;

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

		}
Esempio n. 13
0
		TitlePositionEnum _Position;	// The position of the title; Default: center
	
		public 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;
				}
			}
		}
		Style _Style;					// border and background properties for series legend itmes and data points
										//   when dynamic exprs are evaluated per group instance
	
		public SeriesGrouping(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
		{
			_DynamicSeries=null;
			_StaticSeries=null;
			_Style=null;

			// Loop thru all the child nodes
			foreach(XmlNode xNodeLoop in xNode.ChildNodes)
			{
				if (xNodeLoop.NodeType != XmlNodeType.Element)
					continue;
				switch (xNodeLoop.Name)
				{
					case "DynamicSeries":
						_DynamicSeries = new DynamicSeries(r, this, xNodeLoop);
						break;
					case "StaticSeries":
						_StaticSeries = new StaticSeries(r, this, xNodeLoop);
						break;
					case "Style":
						_Style = new Style(OwnerReport, this, xNodeLoop);
						OwnerReport.rl.LogError(4, "Style element in SeriesGrouping is currently ignored."); // TODO
						break;
					default:	
						// don't know this element - log it
						OwnerReport.rl.LogError(4, "Unknown SeriesGrouping element '" + xNodeLoop.Name + "' ignored.");
						break;
				}
			}
		}
        List<SeriesGrouping> _Items;			// list of SeriesGrouping

		public SeriesGroupings(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
		{
			SeriesGrouping sg;
            _Items = new List<SeriesGrouping>();
			// Loop thru all the child nodes
			foreach(XmlNode xNodeLoop in xNode.ChildNodes)
			{
				if (xNodeLoop.NodeType != XmlNodeType.Element)
					continue;
				switch (xNodeLoop.Name)
				{
					case "SeriesGrouping":
						sg = new SeriesGrouping(r, this, xNodeLoop);
						break;
					default:
						sg=null;		// don't know what this is
						break;
				}
				if (sg != null)
					_Items.Add(sg);
			}
			if (_Items.Count == 0)
				OwnerReport.rl.LogError(8, "For SeriesGroupings at least one SeriesGrouping is required.");
			else
                _Items.TrimExcess();
		}
Esempio n. 16
0
		bool _RepeatOnNewPage;	// Indicates this header should be displayed on
								// each page that the table (or group) is displayed		

		public Header(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
		{
			_TableRows=null;
			_RepeatOnNewPage=false;

			// Loop thru all the child nodes
			foreach(XmlNode xNodeLoop in xNode.ChildNodes)
			{
				if (xNodeLoop.NodeType != XmlNodeType.Element)
					continue;
				switch (xNodeLoop.Name)
				{
					case "TableRows":
						_TableRows = new TableRows(r, this, xNodeLoop);
						break;
					case "RepeatOnNewPage":
						_RepeatOnNewPage = XmlUtil.Boolean(xNodeLoop.InnerText, OwnerReport.rl);
						break;
					default:
						break;
				}
			}
			if (_TableRows == null)
				OwnerReport.rl.LogError(8, "Header requires the TableRows element.");
		}
		StaticColumns _StaticColumns;		// Static column headings for this grouping		
	
		public ColumnGrouping(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
		{
			_Height=null;
			_DynamicColumns=null;
			_StaticColumns=null;

			// Loop thru all the child nodes
			foreach(XmlNode xNodeLoop in xNode.ChildNodes)
			{
				if (xNodeLoop.NodeType != XmlNodeType.Element)
					continue;
				switch (xNodeLoop.Name)
				{
					case "Height":
						_Height = new RSize(r, xNodeLoop);
						break;
					case "DynamicColumns":
						_DynamicColumns = new DynamicColumns(r, this, xNodeLoop);
						break;
					case "StaticColumns":
						_StaticColumns = new StaticColumns(r, this, xNodeLoop);
						break;
					default:
						break;
				}
			}
			if (_Height == null)
				OwnerReport.rl.LogError(8, "ColumnGrouping requires the Height element to be specified.");

			if ((_DynamicColumns != null && _StaticColumns != null) ||
				(_DynamicColumns == null && _StaticColumns == null))
				OwnerReport.rl.LogError(8, "ColumnGrouping requires either the DynamicColumns element or StaticColumns element but not both.");
		}
        List<MatrixRow> _Items;			// list of MatrixRow

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

			// Loop thru all the child nodes
			foreach(XmlNode xNodeLoop in xNode.ChildNodes)
			{
				if (xNodeLoop.NodeType != XmlNodeType.Element)
					continue;
				switch (xNodeLoop.Name)
				{
					case "DataSetName":
						_DataSetName = xNodeLoop.InnerText;
						break;
					case "ValueField":
						_ValueField = xNodeLoop.InnerText;
						break;
					case "LabelField":
						_LabelField = xNodeLoop.InnerText;
						break;
					default:
						// don't know this element - log it
						OwnerReport.rl.LogError(4, "Unknown DataSetReference element '" + xNodeLoop.Name + "' ignored.");
						break;
				}
			}
			if (_DataSetName == null)
				OwnerReport.rl.LogError(8, "DataSetReference DataSetName is required but not specified.");
			if (_ValueField == null)
				OwnerReport.rl.LogError(8, "DataSetReference ValueField is required but not specified for" + _DataSetName==null? "<unknown name>": _DataSetName);
		}
Esempio n. 21
0
		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
		public 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;
				}
			}
		}
		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.		
	
		public 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;
				}
			}
		}
Esempio n. 23
0
        List<SortBy> _Items;			// list of SortBy

		public Sorting(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
		{
			SortBy s;
            _Items = new List<SortBy>();
			// Loop thru all the child nodes
			foreach(XmlNode xNodeLoop in xNode.ChildNodes)
			{
				if (xNodeLoop.NodeType != XmlNodeType.Element)
					continue;
				switch (xNodeLoop.Name)
				{
					case "SortBy":
						s = new SortBy(r, this, xNodeLoop);
						break;
					default:	
						s=null;		// don't know what this is
						// don't know this element - log it
						OwnerReport.rl.LogError(4, "Unknown Sorting element '" + xNodeLoop.Name + "' ignored.");
						break;
				}
				if (s != null)
					_Items.Add(s);
			}
			if (_Items.Count == 0)
				OwnerReport.rl.LogError(8, "Sorting requires at least one SortBy be defined.");
			else
                _Items.TrimExcess();
		}
 public Expression(ReportDefn r, ReportLink p, String xNode, ExpressionType et) : base(r, p)
 {
     _Source = xNode;
     _Type = TypeCode.Empty;
     _ExpectedType = et;
     _Expr = null;
 }
Esempio n. 25
0
		Style _Style;		// Defines the border and background style
							//  properties for the marker(s).		
	
		public Marker(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
		{
			_Type=MarkerTypeEnum.None;
			_Size=null;
			_Style=null;

			// Loop thru all the child nodes
			foreach(XmlNode xNodeLoop in xNode.ChildNodes)
			{
				if (xNodeLoop.NodeType != XmlNodeType.Element)
					continue;
				switch (xNodeLoop.Name)
				{
					case "Type":
						_Type = MarkerType.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
						break;
					case "Size":
						_Size = new RSize(r, xNodeLoop);
						break;
					case "Style":
						_Style = new Style(r, this, xNodeLoop);
						break;
					default:
						break;
				}
			}
		}
        List<DataPoint> _Items;			// list of datapoint

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

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

		public DrillthroughParameters(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
		{
			DrillthroughParameter d;
            _Items = new List<DrillthroughParameter>();
			// Loop thru all the child nodes
			foreach(XmlNode xNodeLoop in xNode.ChildNodes)
			{
				if (xNodeLoop.NodeType != XmlNodeType.Element)
					continue;
				switch (xNodeLoop.Name)
				{
					case "Parameter":
						d = new DrillthroughParameter(r, this, xNodeLoop);
						break;
					default:	
						d=null;		// don't know what this is
						// don't know this element - log it
						OwnerReport.rl.LogError(4, "Unknown Parameters element '" + xNodeLoop.Name + "' ignored.");
						break;
				}
				if (d != null)
					_Items.Add(d);
			}
			if (_Items.Count > 0)
                _Items.TrimExcess();
		}
Esempio n. 29
0
		List<Textbox> _GrowList;	// list of TextBox's that need to be checked for growth

		public TableRow(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
		{
			_TableCells=null;
			_Height=null;
			_Visibility=null;
			_CanGrow = false;
			_GrowList = null;

			// Loop thru all the child nodes
			foreach(XmlNode xNodeLoop in xNode.ChildNodes)
			{
				if (xNodeLoop.NodeType != XmlNodeType.Element)
					continue;
				switch (xNodeLoop.Name)
				{
					case "TableCells":
						_TableCells = new TableCells(r, this, xNodeLoop);
						break;
					case "Height":
						_Height = new RSize(r, xNodeLoop);
						break;
					case "Visibility":
						_Visibility = new Visibility(r, this, xNodeLoop);
						break;
					default:
						// don't know this element - log it
						OwnerReport.rl.LogError(4, "Unknown TableRow element '" + xNodeLoop.Name + "' ignored.");
						break;
				}
			}
			if (_TableCells == null)
				OwnerReport.rl.LogError(8, "TableRow requires the TableCells element.");
			if (_Height == null)
				OwnerReport.rl.LogError(8, "TableRow requires the Height element.");
		}
		Expression _Bottom;	//(Size) Width of the bottom border. Max: 20 pt Min: 0.25 pt
	
		public 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;
				}
			}
		}
Esempio n. 31
0
        bool _CanGrow;                          // if any TableRow contains a TextBox with CanGrow

        public TableRows(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            TableRow t;

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

                default:
                    t = null;                                   // don't know what this is
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown TableRows element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
                if (t != null)
                {
                    _Items.Add(t);
                }
            }
            if (_Items.Count == 0)
            {
                OwnerReport.rl.LogError(8, "For TableRows at least one TableRow is required.");
            }
            else
            {
                _Items.TrimExcess();
            }
        }
        public RowGroupings(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            RowGrouping g;

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

                default:
                    g = null;                                   // don't know what this is
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown RowGroupings element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
                if (g != null)
                {
                    _Items.Add(g);
                }
            }
            if (_Items.Count == 0)
            {
                OwnerReport.rl.LogError(8, "For RowGroupings at least one RowGrouping is required.");
            }
            else
            {
                _Items.TrimExcess();
                _StaticCount = GetStaticCount();
            }
        }
Esempio n. 33
0
        public Rectangle(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p, xNode)
        {
            _ReportItems      = null;
            _PageBreakAtStart = false;
            _PageBreakAtEnd   = false;

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

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

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

                default:
                    if (ReportItemElement(xNodeLoop))                                   // try at ReportItem level
                    {
                        break;
                    }
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown Rectangle element " + xNodeLoop.Name + " ignored.");
                    break;
                }
            }
        }
Esempio n. 34
0
        List <SortBy> _Items;                    // list of SortBy

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

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

                default:
                    s = null;                                   // don't know what this is
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown Sorting element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
                if (s != null)
                {
                    _Items.Add(s);
                }
            }
            if (_Items.Count == 0)
            {
                OwnerReport.rl.LogError(8, "Sorting requires at least one SortBy be defined.");
            }
            else
            {
                _Items.TrimExcess();
            }
        }
Esempio n. 35
0
        List <MatrixColumn> _Items;                      // list of MatrixColumn

        public MatrixColumns(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            MatrixColumn m;

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

                default:
                    m = null;                                   // don't know what this is
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown MatrixColumns element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
                if (m != null)
                {
                    _Items.Add(m);
                }
            }
            if (_Items.Count == 0)
            {
                OwnerReport.rl.LogError(8, "For MatrixColumns at least one MatrixColumn is required.");
            }
            else
            {
                _Items.TrimExcess();
            }
        }
Esempio n. 36
0
        StaticRows _StaticRows;   // Static row headings for this grouping

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

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

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

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

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

        public FilterValues(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            FilterValue f;

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

                default:
                    f = null;                                   // don't know what this is
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown FilterValues element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
                if (f != null)
                {
                    _Items.Add(f);
                }
            }
            if (_Items.Count == 0)
            {
                OwnerReport.rl.LogError(8, "For FilterValues at least one FilterValue is required.");
            }
            else
            {
                _Items.TrimExcess();
            }
        }
        List <StaticMember> _Items;                      // list of StaticMember

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

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

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

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

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

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

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

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

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

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

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

                default:
                    g = null;                                   // don't know what this is
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown GroupExpressions element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
                if (g != null)
                {
                    _Items.Add(g);
                }
            }
            if (_Items.Count == 0)
            {
                OwnerReport.rl.LogError(8, "GroupExpressions require at least one GroupExpression be defined.");
            }
            else
            {
                _Items.TrimExcess();
            }
        }
Esempio n. 42
0
        bool _FixedHeader = false;      // Header of this column should be display even when scrolled

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

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

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

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

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

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

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

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

                default:
                    tc = null;                                          // don't know what this is
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown TableCells element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
                if (tc != null)
                {
                    _Items.Add(tc);
                }
            }
            if (_Items.Count > 0)
            {
                _Items.TrimExcess();
            }
        }
Esempio n. 44
0
        List <CategoryGrouping> _Items;                  // list of category groupings

        public CategoryGroupings(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            CategoryGrouping cg;

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

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

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

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

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

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

            if (_InstanceName == null)
            {
                OwnerReport.rl.LogError(8, "Class InstanceName is required but not specified or invalid for " + _ClassName == null? "<unknown name>": _ClassName);
            }
        }
Esempio n. 46
0
        Axis _Axis;                     // Display properties for the value axis.

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

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

                default:
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown ValueAxis element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
            }
        }
        RSize _Width;                   // Width of each detail cell in this column

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

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

                default:
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown MatrixColumn element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
            }
        }
        Expression _Label;              //(Variant) The label displayed on the axis.

        public 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.");
            }
        }
        List <ReportItem> _Items;                                       // list of report items

        public ReportItems(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            ReportItem ri;

            _Items = new List <ReportItem>();

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

                case "Line":
                    ri = new Line(r, this, xNodeLoop);
                    break;

                case "Textbox":
                    ri = new Textbox(r, this, xNodeLoop);
                    break;

                case "Image":
                    ri = new Image(r, this, xNodeLoop);
                    break;

                case "Subreport":
                    ri = new Subreport(r, this, xNodeLoop);
                    break;

                // DataRegions: list, table, matrix, chart
                case "List":
                    ri = new List(r, this, xNodeLoop);
                    break;

                case "Table":
                case "Grid":
                case "fyi:Grid":
                    ri = new Table(r, this, xNodeLoop);
                    break;

                case "Matrix":
                    ri = new Matrix(r, this, xNodeLoop);
                    break;

                case "Chart":
                    ri = new Chart(r, this, xNodeLoop);
                    break;

                case "ChartExpression":                                 // For public use only
                    ri = new ChartExpression(r, this, xNodeLoop);
                    break;

                case "CustomReportItem":
                    ri = new CustomReportItem(r, this, xNodeLoop);
                    break;

                default:
                    ri = null;                                          // don't know what this is
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown ReportItems element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
                if (ri != null)
                {
                    _Items.Add(ri);
                }
            }
            if (_Items.Count == 0)
            {
                OwnerReport.rl.LogError(8, "At least one item must be in the ReportItems.");
            }
            else
            {
                _Items.TrimExcess();
            }
        }
Esempio n. 50
0
 public ReportLink(ReportDefn r, ReportLink p)
 {
     OwnerReport  = r;
     Parent       = p;
     ObjectNumber = r.GetObjectNumber();
 }
Esempio n. 51
0
 public void Remove(ReportDefn rd, string name)
 {
     _RunCache.Remove(GetKey(rd, name));
 }
        public 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;
                }
            }
        }
Esempio n. 53
0
        bool _FilterOperatorSingleRow;                  // false for Top/Bottom N and Percent; otherwise true
        public 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 = Oranikle.Report.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;
            }
        }
        Expression _Expression;                         //

        public GroupExpression(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            _Expression = new Expression(r, this, xNode, ExpressionType.Variant);
        }
Esempio n. 55
0
 public object Get(ReportDefn rd, string name)
 {
     return(_RunCache[GetKey(rd, name)]);
 }
Esempio n. 56
0
        bool _Clustered;                                    // Determines if data series are clustered
        // (displayed along distinct rows). Only
        // applies to bar and column chart types.  Defaults to false.

        public ThreeDProperties(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            _Enabled        = false;
            _ProjectionMode = ThreeDPropertiesProjectionModeEnum.Perspective;
            _Rotation       = 0;
            _Inclination    = 0;
            _Perspective    = 0;
            _HeightRatio    = 0;
            _DepthRatio     = 0;
            _Shading        = ThreeDPropertiesShadingEnum.None;
            _GapDepth       = 0;
            _WallThickness  = 0;
            _DrawingStyle   = ThreeDPropertiesDrawingStyleEnum.Cube;
            _Clustered      = false;

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

                case "ProjectionMode":
                    _ProjectionMode = ThreeDPropertiesProjectionMode.GetStyle(xNodeLoop.InnerText);
                    break;

                case "Rotation":
                    _Rotation = XmlUtil.Integer(xNodeLoop.InnerText);
                    break;

                case "Inclination":
                    _Inclination = XmlUtil.Integer(xNodeLoop.InnerText);
                    break;

                case "Perspective":
                    _Perspective = XmlUtil.Integer(xNodeLoop.InnerText);
                    break;

                case "HeightRatio":
                    _HeightRatio = XmlUtil.Integer(xNodeLoop.InnerText);
                    break;

                case "DepthRatio":
                    _DepthRatio = XmlUtil.Integer(xNodeLoop.InnerText);
                    break;

                case "Shading":
                    _Shading = ThreeDPropertiesShading.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

                case "GapDepth":
                    _GapDepth = XmlUtil.Integer(xNodeLoop.InnerText);
                    break;

                case "WallThickness":
                    _WallThickness = XmlUtil.Integer(xNodeLoop.InnerText);
                    break;

                case "DrawingStyle":
                    _DrawingStyle = ThreeDPropertiesDrawingStyle.GetStyle(xNodeLoop.InnerText, OwnerReport.rl);
                    break;

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

                default:
                    break;
                }
            }
        }
        List <Textbox> _HideDuplicates;         // holds any textboxes that use this as a hideduplicate scope

        public DataSetDefn(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            _Name                = null;
            _Fields              = null;
            _Query               = null;
            _CaseSensitivity     = TrueFalseAutoEnum.True;
            _Collation           = null;
            _AccentSensitivity   = TrueFalseAutoEnum.False;
            _KanatypeSensitivity = TrueFalseAutoEnum.False;
            _WidthSensitivity    = TrueFalseAutoEnum.False;
            _Filters             = null;
            _HideDuplicates      = null;
            // Run thru the attributes
            foreach (XmlAttribute xAttr in xNode.Attributes)
            {
                switch (xAttr.Name)
                {
                case "Name":
                    _Name = new Name(xAttr.Value);
                    break;
                }
            }

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

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

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

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

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

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

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

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

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

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

            if (_Query == null)
            {
                OwnerReport.rl.LogError(8, "Query element must be specified in a DataSet.");
            }
        }
Esempio n. 58
0
        bool _CanOmit = false;    // When display values don't fit, is it OK to drop some from display

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                default:
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown Axis element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
            }
        }
Esempio n. 59
0
 public void SetReportDefinition(ReportDefn r)
 {
     _Report         = r;
     _UserParameters = null;     // force recalculation of user parameters
 }
Esempio n. 60
0
 public void Add(ReportDefn rd, string name, object o)
 {
     _RunCache.Add(GetKey(rd, name), o);
 }