在fastreport2.52中是这样的写的:
procedure TFrm_StudentArchives_In.frRprt_JszsqBeforePrint(
  Memo: TStringList; View: TfrView);
begin
  if View.Name = 'Mm_Jxmc' then TfrMemoView(View).Memo.Text := Jxjc+'-'+Jxbm;
  if (Code_Image='Yes') then
    if View.Name = 'Pic1' then TfrPictureView(View).Picture.assign(Image1.Picture);
  if CodeSj_Image='Yes' then
    if View.Name = 'Pic_Sj' then TfrPictureView(View).Picture.assign(Img_sj.Picture);
end;
或者是: 
  wxbh_rprt := TfrMemoView(frRprt_jsd.FindObject('Mm_wxbh'));
  wxbh_rprt.Memo.Text := Edit_wxbh.Text;请教各位:fastreport4.2 如何打印form窗体中的Edit中的内容?

解决方案 »

  1.   

    我用了如下方法,但有错误,无法运行: 
    var
      mm_Payee11: TfrMemoView;
    begin
     mm_Payee11 := TfrMemoView(frxReport1.FindObject('mm_Payee'));
      if mm_Payee11 <> nil then
        mm_Payee11.Memo.Text := Cmb_Payee.Text;
    end;
      

  2.   

    var 
      mm_Payee11: TfrMemoView; 
    begin 
    mm_Payee11 := TfrMemoView(frxReport1.FindObject('mm_Payee'));//这个应该是 'mm_Payee11'吧!  
    if mm_Payee11 <> nil then 
        mm_Payee11.Memo.Text := Cmb_Payee.Text; 
    end;
      

  3.   

    解决:
    var  mm_Payee11: TfrxMemoView;
     
     mm_Payee11:= TfrxMemoView(frxReport1.FindObject('mm_Payee'));
      if mm_Payee11 <> nil then
        mm_Payee11.Memo.Text := Cmb_Payee.Text;
      frxReport1.PrepareReport();
      frxReport1.ShowPreparedReport;
      

  4.   

    想用这种方法
    procedure TFrm_StudentArchives_In.frRprt_JszsqBeforePrint( 
      Memo: TStringList; View: TfrView); 
    begin 
      if View.Name = 'Mm_Jxmc' then TfrMemoView(View).Memo.Text := Jxjc+'-'+Jxbm; 
      if (Code_Image='Yes') then 
        if View.Name = 'Pic1' then TfrPictureView(View).Picture.assign(Image1.Picture); 
      if CodeSj_Image='Yes' then 
        if View.Name = 'Pic_Sj' then TfrPictureView(View).Picture.assign(Img_sj.Picture); 
    end; 
    不知道在fst4.2中应该怎么写呢?