//----------------------------------------------------------------------------------------------------x /// <summary>Creates a new table layout manager.</summary> /// <param name="report">Report of this table layout manager</param> public TableLayoutManager(Report report) : base(report) { tlmHeightMode = TlmHeightMode.Static; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -x PenProp penProp_Solid = new PenProp(report, 0.5, Color.Black); tlmCellDef_Default.penProp_LineV = penProp_Solid; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -x tlmColumnDef_Default.penProp_BorderH = penProp_Solid; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -x tlmCellDef_Header = new TlmCellDef(); tlmRowDef_Header = new TlmRowDef(); tlmCellDef_Header.rAlignH = RepObj.rAlignLeft; tlmCellDef_Header.rAlignV = RepObj.rAlignTop; tlmCellDef_Header.rAngle = 0; tlmCellDef_Header.tlmTextMode = TlmTextMode.MultiLine; tlmCellDef_Header.rLineFeed = 72.0 / 6; tlmCellDef_Header.rMargin = 0; tlmCellDef_Header.rIndentH_MM = 1; tlmCellDef_Header.rIndentV_MM = 2; tlmCellDef_Header.brushProp_Back = new BrushProp(report, Color.FromArgb(220, 220, 220)); tlmCellDef_Header.penProp_Line = penProp_Solid; }
/// <summary>Creates the table header.</summary> private void CreateHeader(Container cont) { TlmRow row = tlmRow_New((TlmRow)null, aCellCreateType); row.bAutoCommit = false; row.rPreferredHeight = tlmRowDef_Header.rPreferredHeight; foreach (TlmColumn col in al_TlmColumn) { TlmCell cell = row.aTlmCell[col.iIndex]; TlmCellDef hd_Base = tlmCellDef_Header; TlmCellDef hd_Col = col.tlmCellDef_Header; cell.rAlignH = (Double.IsNaN(hd_Col.rAlignH) ? hd_Base.rAlignH : hd_Col.rAlignH); cell.rAlignV = (Double.IsNaN(hd_Col.rAlignV) ? hd_Base.rAlignV : hd_Col.rAlignV); cell.rAngle = (Double.IsNaN(hd_Col.rAngle) ? hd_Base.rAngle : hd_Col.rAngle); cell.tlmTextMode = (hd_Col.tlmTextMode == TlmTextMode.FallBack ? hd_Base.tlmTextMode : hd_Col.tlmTextMode); cell.rLineFeed = (Double.IsNaN(hd_Col.rLineFeed) ? hd_Base.rLineFeed : hd_Col.rLineFeed); cell.rMarginLeft = (Double.IsNaN(hd_Col.rMarginLeft) ? hd_Base.rMarginLeft : hd_Col.rMarginLeft); cell.rMarginRight = (Double.IsNaN(hd_Col.rMarginRight) ? hd_Base.rMarginRight : hd_Col.rMarginRight); cell.rMarginTop = (Double.IsNaN(hd_Col.rMarginTop) ? hd_Base.rMarginTop : hd_Col.rMarginTop); cell.rMarginBottom = (Double.IsNaN(hd_Col.rMarginBottom) ? hd_Base.rMarginBottom : hd_Col.rMarginBottom); cell.rIndentLeft = (Double.IsNaN(hd_Col.rIndentLeft) ? hd_Base.rIndentLeft : hd_Col.rIndentLeft); cell.rIndentRight = (Double.IsNaN(hd_Col.rIndentRight) ? hd_Base.rIndentRight : hd_Col.rIndentRight); cell.rIndentTop = (Double.IsNaN(hd_Col.rIndentTop) ? hd_Base.rIndentTop : hd_Col.rIndentTop); cell.rIndentBottom = (Double.IsNaN(hd_Col.rIndentBottom) ? hd_Base.rIndentBottom : hd_Col.rIndentBottom); cell.brushProp_Back = (Object.ReferenceEquals(hd_Col.brushProp_Back, BrushProp.bp_Null) ? hd_Base.brushProp_Back : hd_Col.brushProp_Back); cell.penProp_LineLeft = (Object.ReferenceEquals(hd_Col.penProp_LineLeft, PenProp.penProp_Null) ? hd_Base.penProp_LineLeft : hd_Col.penProp_LineLeft); cell.penProp_LineRight = (Object.ReferenceEquals(hd_Col.penProp_LineRight, PenProp.penProp_Null) ? hd_Base.penProp_LineRight : hd_Col.penProp_LineRight); cell.penProp_LineTop = (Object.ReferenceEquals(hd_Col.penProp_LineTop, PenProp.penProp_Null) ? hd_Base.penProp_LineTop : hd_Col.penProp_LineTop); cell.penProp_LineBottom = (Object.ReferenceEquals(hd_Col.penProp_LineBottom, PenProp.penProp_Null) ? hd_Base.penProp_LineBottom : hd_Col.penProp_LineBottom); cell.iOrderLineLeft = (hd_Col.iOrderLineLeft == Int32.MinValue ? hd_Base.iOrderLineLeft : hd_Col.iOrderLineLeft); cell.iOrderLineRight = (hd_Col.iOrderLineRight == Int32.MinValue ? hd_Base.iOrderLineRight : hd_Col.iOrderLineRight); cell.iOrderLineTop = (hd_Col.iOrderLineTop == Int32.MinValue ? hd_Base.iOrderLineTop : hd_Col.iOrderLineTop); cell.iOrderLineBottom = (hd_Col.iOrderLineBottom == Int32.MinValue ? hd_Base.iOrderLineBottom : hd_Col.iOrderLineBottom); if (col.sHeader != null) { cell.Add(new RepString(col.fontProp_Header, col.sHeader)); } } }
//----------------------------------------------------------------------------------------------------x /// <summary>Creates a column definition object.</summary> /// <param name="tlmBase">Table layout manager of this column</param> /// <param name="rWidth">Width of the column (points, 1/72 inch)</param> internal TlmColumn(TlmBase tlmBase, Double rWidth) { tlmBase.CheckStatus_Init("cannot add columns."); this.tlmBase = tlmBase; tlmCellDef_Default = new TlmCellDef(); iIndex = tlmBase.al_TlmColumn.Count; tlmBase.al_TlmColumn.Add(this); if (rWidth <= 0) { throw new ReportException("Invalid value for the column width"); } this.rWidth = rWidth; rBorderTop = tlmBase.tlmColumnDef_Default.rBorderTop; rBorderBottom = tlmBase.tlmColumnDef_Default.rBorderBottom; penProp_BorderTop = tlmBase.tlmColumnDef_Default.penProp_BorderTop; penProp_BorderBottom = tlmBase.tlmColumnDef_Default.penProp_BorderBottom; }
//----------------------------------------------------------------------------------------------------x /// <summary>Creates a cell definition object.</summary> /// <param name="tlmColumn_Start">Start column</param> /// <param name="tlmColumn_End">End column</param> /// <param name="tlmRow">Start row</param> internal TlmCell(TlmColumn tlmColumn_Start, TlmColumn tlmColumn_End, TlmRow tlmRow) { this.tlmColumn_Start = tlmColumn_Start; this.tlmColumn_End = tlmColumn_End; tlmRow_Start = tlmRow; tlmRow_End = tlmRow; TlmCellDef cd_Col = tlmColumn_Start.tlmCellDef_Default; TlmCellDef cd_Base = tlmBase.tlmCellDef_Default; rAlignH = (Double.IsNaN(cd_Col.rAlignH) ? cd_Base.rAlignH : cd_Col.rAlignH); rAlignV = (Double.IsNaN(cd_Col.rAlignV) ? cd_Base.rAlignV : cd_Col.rAlignV); rAngle = (Double.IsNaN(cd_Col.rAngle) ? cd_Base.rAngle : cd_Col.rAngle); tlmTextMode = (cd_Col.tlmTextMode == TlmTextMode.FallBack ? cd_Base.tlmTextMode : cd_Col.tlmTextMode); rLineFeed = (Double.IsNaN(cd_Col.rLineFeed) ? cd_Base.rLineFeed : cd_Col.rLineFeed); rMarginLeft = (Double.IsNaN(cd_Col.rMarginLeft) ? cd_Base.rMarginLeft : cd_Col.rMarginLeft); rMarginRight = (Double.IsNaN(cd_Col.rMarginRight) ? cd_Base.rMarginRight : cd_Col.rMarginRight); rMarginTop = (Double.IsNaN(cd_Col.rMarginTop) ? cd_Base.rMarginTop : cd_Col.rMarginTop); rMarginBottom = (Double.IsNaN(cd_Col.rMarginBottom) ? cd_Base.rMarginBottom : cd_Col.rMarginBottom); rIndentLeft = (Double.IsNaN(cd_Col.rIndentLeft) ? cd_Base.rIndentLeft : cd_Col.rIndentLeft); rIndentRight = (Double.IsNaN(cd_Col.rIndentRight) ? cd_Base.rIndentRight : cd_Col.rIndentRight); rIndentTop = (Double.IsNaN(cd_Col.rIndentTop) ? cd_Base.rIndentTop : cd_Col.rIndentTop); rIndentBottom = (Double.IsNaN(cd_Col.rIndentBottom) ? cd_Base.rIndentBottom : cd_Col.rIndentBottom); brushProp_Back = (Object.ReferenceEquals(cd_Col.brushProp_Back, BrushProp.bp_Null) ? cd_Base.brushProp_Back : cd_Col.brushProp_Back); penProp_LineLeft = (Object.ReferenceEquals(cd_Col.penProp_LineLeft, PenProp.penProp_Null) ? cd_Base.penProp_LineLeft : cd_Col.penProp_LineLeft); penProp_LineRight = (Object.ReferenceEquals(cd_Col.penProp_LineRight, PenProp.penProp_Null) ? cd_Base.penProp_LineRight : cd_Col.penProp_LineRight); penProp_LineTop = (Object.ReferenceEquals(cd_Col.penProp_LineTop, PenProp.penProp_Null) ? cd_Base.penProp_LineTop : cd_Col.penProp_LineTop); penProp_LineBottom = (Object.ReferenceEquals(cd_Col.penProp_LineBottom, PenProp.penProp_Null) ? cd_Base.penProp_LineBottom : cd_Col.penProp_LineBottom); iOrderLineLeft = (cd_Col.iOrderLineLeft == Int32.MinValue ? cd_Base.iOrderLineLeft : cd_Col.iOrderLineLeft); iOrderLineRight = (cd_Col.iOrderLineRight == Int32.MinValue ? cd_Base.iOrderLineRight : cd_Col.iOrderLineRight); iOrderLineTop = (cd_Col.iOrderLineTop == Int32.MinValue ? cd_Base.iOrderLineTop : cd_Col.iOrderLineTop); iOrderLineBottom = (cd_Col.iOrderLineBottom == Int32.MinValue ? cd_Base.iOrderLineBottom : cd_Col.iOrderLineBottom); }