unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  Grids, DBGrids, Db, DBTables, StdCtrls, ekfunc, ekrtf, ekbasereport;

type
  TForm1 = class(TForm)
    parts: TTable;
    DataSource1: TDataSource;
    DBGrid1: TDBGrid;
    EkRTF1: TEkRTF;
    RptBtn: TButton;
    CloseBtn: TButton;
    procedure CloseBtnClick(Sender: TObject);
    procedure RptBtnClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.CloseBtnClick(Sender: TObject);
begin
Close;
end;

procedure TForm1.RptBtnClick(Sender: TObject);
begin
   EKRTF1.ClearVars;
   EKRTF1.ExecuteOpen([parts],SW_SHOW);
end;

end.
