Exemplo n.º 1
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 void TableRowEnd(TableRow tr, Row row)
		{
			tw.WriteLine("</tr>");
		}
		public void TableRowStart(TableRow tr, Row row)
		{
			tw.Write("\t<tr");
			ReportLink rl = tr.Parent.Parent;
			Visibility v=null;
			Textbox togText=null;		// holds the toggle text box if any
			if (rl is Details)
			{
				Details d = (Details) rl;
				v = d.Visibility;
				togText = d.ToggleTextbox;
			}
			else if (rl.Parent is TableGroup)
			{
				TableGroup tg = (TableGroup) rl.Parent;
				v = tg.Visibility;
				togText = tg.ToggleTextbox;
			}

			if (v != null &&
				v.Hidden != null)
			{
				bool bHide = v.Hidden.EvaluateBoolean(this.r, row);
				if (bHide)
					tw.Write(" style=\"display:none;\"");
			}

			if (togText != null && togText.Name != null)
			{
				string name = togText.Name.Nm + "_" + togText.RunCount(this.r).ToString();
				tw.Write(" id='{0}'", name);
			}

			tw.Write(">");
		}
Exemplo n.º 4
0
 public void TableRowEnd(TableRow tr, Row r)
 {
     tw.WriteLine();
 }
Exemplo n.º 5
0
 public void TableRowStart(TableRow tr, Row r)
 {
 }
Exemplo n.º 6
0
			public float CalcHeight;		// dynamic when CanGrow true
			public WorkClass(TableRow tr)
			{
				CalcHeight = tr.Height.Points;
			}
Exemplo n.º 7
0
		string TableGetRowElementName(TableRow tr)
		{
			for (ReportLink rl = tr.Parent; !(rl is Table); rl = rl.Parent)
			{
				if (rl is Header || rl is Footer)
					return null;

				if (rl is TableGroup)
				{
					TableGroup tg = rl as TableGroup;
					Grouping g = tg.Grouping;
					return g.DataElementName;
				}

				if (rl is Details)
				{
					Table t = (Table) stkReportItem.Peek();

                    return t.DetailDataElementOutput == DataElementOutputEnum.NoOutput?
                        null: t.DetailDataElementName;
				}
			}

			return null;
		}
Exemplo n.º 8
0
		public void TableRowEnd(TableRow tr, Row row)
		{
			string n = TableGetRowElementName(tr);
			if (n == null)
				return;
			this.PopContainer(n);
		}
Exemplo n.º 9
0
		public void TableRowStart(TableRow tr, Row row)
		{
			string n = TableGetRowElementName(tr);
			if (n == null)
				return;
			PushContainer(n);
		}
Exemplo n.º 10
0
		public void TableRowEnd(TableRow tr, Row row)
		{
		}
Exemplo n.º 11
0
		public void TableRowStart(TableRow tr, Row row)
		{
            _ExcelRow++;
            _Excel.SetRowHeight(_ExcelRow, tr.HeightOfRow(r, this.GetGraphics, row));
            _ExcelCol = -1;
		}