home *** CD-ROM | disk | FTP | other *** search
- unit UGetStarted;
-
- interface
-
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- StdCtrls, UFlexcelReport, UExcelAdapter, XLSAdapter, Db, DBTables,
- UCustomFlexCelReport, UWaitCursor;
-
- type
- TForm1 = class(TForm)
- Cust: TTable;
- CustCustNo: TFloatField;
- CustCompany: TStringField;
- CustPhone: TStringField;
- CustLastInvoiceDate: TDateTimeField;
- CustAddr1: TStringField;
- CustAddr2: TStringField;
- CustCity: TStringField;
- CustState: TStringField;
- CustZip: TStringField;
- CustCountry: TStringField;
- CustFAX: TStringField;
- CustTaxRate: TFloatField;
- CustContact: TStringField;
- CustTotAddr1: TStringField;
- CustTotAddr2: TStringField;
- XLSAdapter: TXLSAdapter;
- RepStart: TFlexCelReport;
- Button1: TButton;
- Memo1: TMemo;
- SaveDialog1: TSaveDialog;
- procedure Button1Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- Form1: TForm1;
-
- implementation
-
- {$R *.DFM}
-
- procedure TForm1.Button1Click(Sender: TObject);
- var
- WaitCursor: IWaitCursor;
- begin
- if not SaveDialog1.Execute then exit;
- if FileExists(SaveDialog1.FileName) then DeleteFile(SaveDialog1.FileName);
- RepStart.FileName:=SaveDialog1.FileName;
- WaitCursor:=TWaitCursor.Create;
- RepStart.Run;
- end;
-
- end.
-