FastReport VCL是用于 Delphi、C++ Builder、RAD Studio 和 Lazarus 的报告和文档创建 VCL 库。它提供了可视化模板设计器,可以访问 30 多种格式,并可以部署到云、网站、电子邮件和打印中。
要从脚本中引用我们的组件,需要在脚本系统中注册其类、属性和方法。注册代码,根据FastReport的要求,可以放在与组件代码文件同名的文件中,添加RTTI后缀(例如本例中的frxBitBtnRTTI.pas)。查看更多关于课程
FastScript 脚本库文档中的注册、方法和属性。
uses fs_iinterpreter, frxBitBtn, frxClassRTTI;
type
TFunctions = class(TfsRTTIModule)
public
constructor Create(AScript: TfsScript); override;
end;
constructor TFunctions.Create(AScript: TfsScript);
begin
inherited Create(AScript);
with AScript do
begin
{ register class, and then define its parent }
AddClass(TfrxBitBtnControl, 'TfrxDialogControl');
{ if there are several common controls in your unit, they can be registered right here }
{ for example, AddClass(TfrxAnotherControl, 'TfrxDialogControl'); }
end;
end;
initialization
fsRTTIModules.Add(TFunctions);
end.
如果您对 FastReport 感兴趣,欢迎加入 FastReport QQ 交流群:702295239