public override void DrawMe(float printingTop, EbReport Rep, List <Param> Params, int slno) { ColumnText ct = new ColumnText(Rep.Canvas); string column_val = Rep.GetDataFieldValue(ColumnName, slno, TableIndex); if (Prefix != "" || Suffix != "") { column_val = Prefix + " " + column_val + " " + Suffix; } Phrase phrase = GetPhrase(column_val, (DbType)DbType, Rep.Font); if (!string.IsNullOrEmpty(LinkRefId)) { Anchor a = CreateLink(phrase, LinkRefId, Rep.Doc, Params); Paragraph p = new Paragraph { a }; p.Font = GetItextFont(this.Font, Rep.Font); ct.AddText(p); } else { ct.AddText(phrase); } float ury = Rep.HeightPt - (printingTop + TopPt + Rep.detailprintingtop); float lly = Rep.HeightPt - (printingTop + TopPt + HeightPt + Rep.detailprintingtop); ct.SetSimpleColumn(Llx, lly, Urx, ury, Leading, (int)TextAlign); ct.Go(); }
public override void DrawMe(float printingTop, EbReport Rep, List <Param> Params, int slno) { ColumnText ct = new ColumnText(Rep.Canvas); string column_val = Rep.GetDataFieldValue(ColumnName, slno, TableIndex); float ury = Rep.HeightPt - (printingTop + TopPt + Rep.detailprintingtop); float lly = Rep.HeightPt - (printingTop + TopPt + HeightPt + Rep.detailprintingtop); if (SuppressIfZero && !(Convert.ToDecimal(column_val) > 0)) { column_val = String.Empty; } else { column_val = FormatDecimals(column_val, AmountInWords, DecimalPlaces, Rep.CultureInfo?.NumberFormat, FormatUsingCulture); if (Prefix != "" || Suffix != "") { column_val = Prefix + " " + column_val + " " + Suffix; } } Phrase phrase = GetPhrase(column_val, (DbType)DbType, Rep.Font); if (!string.IsNullOrEmpty(LinkRefId)) { Anchor a = CreateLink(phrase, LinkRefId, Rep.Doc, Params); Paragraph p = new Paragraph { a }; p.Font = GetItextFont(this.Font, Rep.Font); ct.AddText(p); } else { ct.AddText(phrase); } ct.Canvas.SetColorFill(GetColor(ForeColor)); ct.SetSimpleColumn(Llx, lly, Urx, ury, Leading, (int)TextAlign); ct.Go(); }