簡體   English   中英

Rave向DataText報告

[英]Rave Reports DataText Left

我正在使用Delphi 7和Rave Reports。 如何根據之前的另一個DataText的大小設置DataText.Left屬性(來自Rave Reports)dinamicaly。 我嘗試使用前一個DataText的寬度,第一個DataText顯示的字段的長度......它們都沒有工作。 如果有人能給我任何想法,我將非常感激。

謝謝

長度不考慮字符的寬度,這取決於字體設置。

// Assumes the AutoSize property is true.
// Note: 8 is added as spacing
DataText.Left := LastDataText.Left + LastDataText.Width + 8;

如果從DataSet加載數據,請查看TField類的DisplayWidth屬性。

// calculate the width of the last field.
TextWidth := DataSet.Fields[0].DisplayWidth * QuickReport.Canvas.TextWidth('M');
DataText.Left := LastDataText.Left + TextWidth;

或者,根據您需要的確切效果,您也可以只使用一個數據文本,並連接數據/靜態文本字段,如下所示:

<FieldName> + ' Some text ' + <Param.ParamName> + ' Some other text'

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM