翻譯|使用教程|編輯:楊鵬連|2021-05-11 10:12:15.460|閱讀 233 次
概述:FastReport用戶可以在報(bào)告中指定一個(gè)或多個(gè)變量。變量的概念本文進(jìn)行了詳細(xì)說明。
# 界面/圖表報(bào)表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關(guān)鏈接:
FastReport VCL是用于Delphi,C ++ Builder,RAD Studio和Lazarus的報(bào)告和文檔創(chuàng)建VCL庫(kù)。它提供了可視化模板設(shè)計(jì)器,可以訪問為30多種格式,并可以部署到云,網(wǎng)站,電子郵件和打印中。
近日,F(xiàn)astReport VCL更新至v6.9,在新版本中,在PDF更新中增加了對(duì)以下對(duì)象的并行表單支持:文本,替換和圖片。相互之間形式中。同時(shí)修復(fù)了多個(gè)Bug問題。歡迎下載體驗(yàn)。(旁邊向下按鈕下載)
立即點(diǎn)擊下載FastReport VCL v6.9最新版
變量的概念在相應(yīng)的章節(jié)中進(jìn)行了詳細(xì)說明。讓我們簡(jiǎn)短地提醒大家要點(diǎn)。
用戶可以在報(bào)告中指定一個(gè)或多個(gè)變量。可以為每個(gè)變量分配一個(gè)值或表達(dá)式,當(dāng)引用一個(gè)變量時(shí)將自動(dòng)計(jì)算出該值或表達(dá)式。變量可以通過“數(shù)據(jù)樹”窗口直觀地插入到報(bào)表中。將變量用于復(fù)合表達(dá)式的別名非常方便,而復(fù)合表達(dá)式經(jīng)常在報(bào)表中使用。
使用變量時(shí),必須使用“ frxVariables”單元。變量由TfrxVariable類表示。
TfrxVariable = class(TCollectionItem)
published
property Name: String; // Name of a variable
property Value: Variant; // Value of a variable
end;
變量列表由TfrxVariables類表示。它包含使用列表所需的所有方法。
TfrxVariables = class(TCollection)
public
// Adds a variable to the end of the list
function Add: TfrxVariable;
// Adds a variable to the given position of the list
function Insert(Index: Integer): TfrxVariable;
// Returns the index of a variable with the given name
function IndexOf(const Name: String): Integer;
// Adds a variable to the specified category
procedure AddVariable(const ACategory, AName: String; const AValue: Variant);
// Deletes a category and all its variables
procedure DeleteCategory(const Name: String);
// Deletes a variable
procedure DeleteVariable(const Name: String);
// Returns the list of categories
procedure GetCategoriesList(List: TStrings; ClearList: Boolean = True);
// Returns the list of variables in the specified category
procedure GetVariablesList(const Category: String; List: TStrings);
// The list of variables
property Items[Index: Integer]: TfrxVariable readonly;
// Values of variables
property Variables[Index: String]: Variant; default;
end;
如果變量列表很長(zhǎng),則按類別將其分組很方便。例如,當(dāng)具有以下變量列表時(shí):
Customer name
Account number
In total
Total vat
可以用以下方式表示它:
Properties
Customer name
Account number
Totals
In total
total vat
有以下限制:
如果您對(duì)FastReport感興趣,歡迎加入FastReport QQ交流群:801349317
還想要更多嗎?您可以點(diǎn)擊閱讀【FastReport報(bào)表2020最新資源盤點(diǎn)】,查找需要的教程資源。讓人興奮的是FastReport .NET正在慧都網(wǎng)火熱銷售中!>>查看價(jià)格詳情
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請(qǐng)務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請(qǐng)郵件反饋至chenjj@fc6vip.cn
文章轉(zhuǎn)載自: