home *** CD-ROM | disk | FTP | other *** search
/ Delphi 5 for Professionals / DELPHI5.iso / AddOns / Books / 4 / EX12.ZIP / UNIT1.PAS < prev   
Encoding:
Pascal/Delphi Source File  |  1995-11-10  |  726 b   |  41 lines

  1. unit Unit1;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  7.   Forms, Dialogs, StdCtrls, DdeMan;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     DdeClientConv1: TDdeClientConv;
  12.     Button1: TButton;
  13.     procedure Button1Click(Sender: TObject);
  14.   private
  15.     { Private declarations }
  16.   public
  17.     { Public declarations }
  18.   end;
  19.  
  20. var
  21.   Form1: TForm1;
  22.  
  23. implementation
  24.  
  25. {$R *.DFM}
  26.  
  27. procedure TForm1.Button1Click(Sender: TObject);
  28. var
  29.   Cmd : String;
  30. begin
  31.   with DdeClientConv1 do
  32.   begin
  33.     OpenLink;
  34.     Cmd:='LoadReport "c:\d\r\video\summary.rpt","@Repvar1=<40>,@Repvar2=<'#39'Smith'#39'>"'#0;
  35.     ExecuteMacro(@Cmd[1], False);
  36.     CloseLink;
  37.   end;
  38. end;
  39.  
  40. end.
  41.