在网上查了好多资料,都是讲FastReport 2.5怎样用,没有讲3.0版的用法,实在郁闷啊!
所以有两个为题老解决不了,
一 如何给Memo付值?
二 如何调用自定义函数?
注:

frReport1.FindObject('Memo1').Memo.Text := Edit1.Text

if AnsiCompareText(‘SUMTOSTR‘, Name) = 0 then 
val := My_Convertion_Routine(frParser.Calc(p1)); 
这样的不要写了,看的太多了!!!

解决方案 »

  1.   

    一 如何给Memo付值?
    TfrxMemoView(frxReport1.FindComponent('Memo1')).Text:=Edit1.Text;
    二 如何调用自定义函数?
    没调用过,我也不会
    FastReport3.0的说明官方网站上有,http://www.fast-report.com/en/documentation/
    只不过是E文的
      

  2.   

    给MEMO付值
    procedure TForm1.Button3Click(Sender: TObject);
    var
      myMemo: TfrxMemoView;
    begin
      myMemo := TfrxMemoView(frxReport1.FindObject('Memo1'));
      if myMemo <> nil then
      myMemo.Memo.Text := form1.Edit1.Text;  frxreport1.ShowReport;
    end;
      

  3.   

    谢谢两位,已找到方法了,下边我列出来
    一 如何给Memo付值?
    用wjc1000(小疙瘩)的方法就可用了,
    二 如何调用自定义函数?(官方帮助的例子)
    function TForm1.MyFunc(s: String ; i: Integer): Boolean; 
    begin 
    // necessary logic 
    end; procedure TForm1.MyProc(s: String ); 
    begin 
    // necessary logic 
    end; function TForm1.frxReport1UserFunction( const MethodName: String ; 
    var Params: Variant): Variant; 
    begin 
    if MethodName = 'MYFUNC' then 
      Result := MyFunc(Params[0], Params[1])
    else if MethodName = 'MYPROC' then 
      MyProc(Params[0]);
    end; 
    在此事件之前要先写以下两句
    frxReport1.AddFunction('function MyFunc(s: String; i: Integer): Boolean'); 
    frxReport1.AddFunction('procedure MyProc(s: String)');