public void MatrixCellEnd(Matrix m, ReportItem ri, int row, int column, Row r)
		{
			if (_SkipMatrixCols == 0)
				tw.Write("</td>");
			else if (_SkipMatrixCols < 0)
			{
				tw.Write("</td>");
				_SkipMatrixCols = -_SkipMatrixCols;
			}
			else
				_SkipMatrixCols--;
			return;
		}
Пример #2
0
 public void MatrixCellEnd(Matrix m, ReportItem ri, int row, int column, Row r)
 {
 }
		public void MatrixCellStart(Matrix m, ReportItem ri, int row, int column, Row r, float h, float w, int colSpan)
		{
			if (ri == null)			// Empty cell?
			{
				if (_SkipMatrixCols == 0)
					tw.Write("<td>");
				return;
			}

			string cssName = CssAdd(ri.Style, ri, r, false, h, w);	// get the style name for this item

			tw.Write("<td id='{0}'", cssName);
			if (colSpan != 1)
			{
				tw.Write(" colspan={0}", colSpan);
				_SkipMatrixCols=-(colSpan-1);	// start it as negative as indicator that we need this </td>
			}
			else
				_SkipMatrixCols=0;
			if (ri is Textbox)
			{
				Textbox tb = (Textbox) ri;
				if (tb.IsToggle && tb.Name != null)		// name is required for this
				{
					string name = tb.Name.Nm + "_" + (tb.RunCount(this.r)+1).ToString();

					bScriptToggle = true;	// we need to generate JavaScript in header
					// TODO -- need to calculate the hide count correctly
					tw.Write(" onClick=\"hideShow(this, {0}, '{1}')\" onMouseOver=\"style.cursor ='hand'\"", 0, name);
				}
			}

			tw.Write(">");
		}
Пример #4
0
		int PositioningWidth(ReportItem ri)
		{
			int w;
			if (ri.Width == null)
			{
				if (ri is Table)
				{
					Table t = ri as Table;
					w = t.WidthInUnits;
				}
				else
					w = int.MaxValue/2;	// MaxValue/2 is just meant to be a large number (but won't overflow when adding in the x)
			}
			else
				w = ri.Width.Size;

			return w;
		}
Пример #5
0
 public void MatrixCellStart(Matrix m, ReportItem ri, int row, int column, Row r, float h, float w, int colSpan)
 {
 }
        private static int CompareRIsByX(ReportItem x, ReportItem y)
        {
            // order by left position
            int l1 = x.Left == null ? 0 : x.Left.Size;
            int l2 = y.Left == null ? 0 : y.Left.Size;

            int rc = l1 - l2;
            if (rc != 0)
                return rc;
            // then by width
            l1 = x.Width == null ? int.MaxValue : x.Width.Size;
            l2 = y.Width == null ? int.MaxValue : y.Width.Size;

            rc = l1 - l2;
            if (rc != 0)
                return rc;
            // then by y position
            int t1 = x.Top == null ? 0 : x.Top.Size;
            int t2 = y.Top == null ? 0 : y.Top.Size;

            return t1 - t2;
        }
        private static int CompareRIsByY(ReportItem x, ReportItem y)
        {
            // order by y position
            int t1 = x.Top == null ? 0 : x.Top.Size;
            int t2 = y.Top == null ? 0 : y.Top.Size;

            int rc = t1 - t2;
            if (rc != 0)
                return rc;
            // then by height
            t1 = x.Height == null ? int.MaxValue : x.Height.Size;
            t2 = y.Height == null ? int.MaxValue : y.Height.Size;

            rc = t1 - t2;
            if (rc != 0)
                return rc;

            // then by x position
            int l1 = x.Left == null ? 0 : x.Left.Size;
            int l2 = y.Left == null ? 0 : y.Left.Size;

            return l1 - l2;
        }
 private static bool InList(ReportItem tb)
 {
     Type tp = tb.Parent.Parent.GetType();
     return (tp == typeof(List));
 }
 private static bool InTable(ReportItem tb)
 {
     Type tp = tb.Parent.Parent.GetType();
     return  (tp == typeof(TableCell) ||
              tp == typeof(Corner) ||
              tp == typeof(DynamicColumns) ||
              tp == typeof(DynamicRows) ||
              tp == typeof(StaticRow) ||
              tp == typeof(StaticColumn) ||
              tp == typeof(Subtotal) ||
              tp == typeof(MatrixCell));
 }
Пример #10
0
        private StyleInfo GetStyle(ReportItem ri, Row row)
        {
            if (ri.Style == null)
                return null;

            return ri.Style.GetStyleInfo(r, row);
        }
		int _ColSpan;					// # of columns spanned
	
		public MatrixCellEntry(Rows d, ReportItem ri)
		{
			_Data = d;
			_DisplayItem = ri;
			_ColSpan = 1;
		}
Пример #12
0
 public void MatrixCellEnd(Matrix m, ReportItem ri, int row, int column, Row r)
 {
     tw.Write(@"\cell");
 }