在frxReport控件的frxReport1GetValue事件里,写上变量名,到时候在报表里引用该变量:[ZBR](注:该变量不用在fastreport定义,在delphi单元如下编写就行)
procedure TFenTanForm.frxReport1GetValue(const VarName: String;
var Value: Variant);
begin
inherited;
if VarName = 'ZBR' then //--到时候在报表里引用该变量:[ZBR] 注:该变量不用在fastreport定义,在delphi单元如此编写就行)
Value := dm.reg.UserName ; //--传进自己想要的值
if varName = 'bcd' then
Value := '陈';
end;
或者第2种方法:
TfrxPictureView(frxrprt1.FindObject('Picture1')).picture.loadfromfile(AppPath);