procedure BeforePrint(Memo: TStringList; View: TfrView); begin if upperCase(view.Name)='MTITLE' then //MTITLE为格式文件中的view名称 memo.Text := '报表名称'; end;
FR吗? 简单啊 在onGetValue里也可以啊procedure TForm1.frReport1GetValue(const ParName: String; var ParValue: Variant); begin if ansiCompareStr(ParName,'myValue')=0 then ParValue:='你的字符串'; end; 在你的那个字段里填写上 [myValue] 就可以了 报表打印的时候myValue就变成'你的字符串'了
在report的beforeprint事件里写上你的赋值过程
谢谢楼上,不过beforeprint里怎么引用fastReport里面的东东呢?又怎么能把值赋到里面呢?
迷惑中....
begin
if upperCase(view.Name)='MTITLE' then //MTITLE为格式文件中的view名称
memo.Text := '报表名称';
end;
简单啊
在onGetValue里也可以啊procedure TForm1.frReport1GetValue(const ParName: String;
var ParValue: Variant);
begin
if ansiCompareStr(ParName,'myValue')=0 then
ParValue:='你的字符串';
end;
在你的那个字段里填写上 [myValue] 就可以了
报表打印的时候myValue就变成'你的字符串'了