您的位置: 首页-> 电脑文摘-> 程序设计-> Delphi/Pascal-> 正文

将程序中Memo组件的内容传递到Rave Report 的Memo组件中
作者佚名 来源InterNet 加入时间:2004-11-23
将程序中Memo组件的内容传递到Rave Report 的Memo组件中
 

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, RpDefine, RpRave, StdCtrls,RVClass,RvProj,RVCsStd;

type
  TForm1 = class(TForm)
    Memo1: TMemo;
    Button1: TButton;
    RvProject1: TRvProject;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
    MyPage : TRavePage;
    MyMemo : TRaveMemo;
begin
    RvProject1.Open;
    with RvProject1.ProjMan do
    begin
        MyPage := FindRaveComponent('Report1.Page1', nil) as TRavePage;
        MyMemo := FindRaveComponent('Memo1', MyPage) as TRaveMemo;
        MyMemo.Text := Memo1.Lines.Text;
    end; {with}
    RvProject1.ExecuteReport('Report1');
    RvProject1.Close;
end;

end.
 


[文章录入员:fightter]

相关文章 相关软件:
::PCBOOKCN'ADS::


::Delphi/Pascal::
C/C++/VC
C++Builder
Basic/VB类
Delphi/Pascal
Java编程
FORTRAN
其它
::阅读排行::
·Delphi与Excel的亲密接...
·Delphi实现串口通信的常用的...
·DELPHI下的多线程程序设计(...
·Delphi中初始化.Ini文件...
·Delphi中用于读写(I/O)...
·谈谈Delphi中的类和对象
·Delphi编译错误中文手册
·Delphi中关于TApplic...
·OPENGL图形程序设计
·SQL的基本操作