home *** CD-ROM | disk | FTP | other *** search
- unit Repdem04;
-
- interface
-
- uses
- SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
- Forms, Dialogs, DBTables, DB, Grids, DBGrids, StdCtrls, Buttons, ExtCtrls,
- PrnGridR, Printers, CB_Types, CB_MFunc;
-
- type
- Tdem04form = class(TForm)
- Panel1: TPanel;
- Label1: TLabel;
- Label2: TLabel;
- Label3: TLabel;
- Preview: TBitBtn;
- Exit: TBitBtn;
- Panel2: TPanel;
- Query1: TQuery;
- Query1PartNo: TFloatField;
- Query1VendorNo: TFloatField;
- Query1Description: TStringField;
- Query1OnHand: TFloatField;
- Query1OnOrder: TFloatField;
- Query1Cost: TCurrencyField;
- Query1ListPrice: TCurrencyField;
- DataSource1: TDataSource;
- DBGrid1: TDBGrid;
- PrintGridReport1: TPrintGridReport;
- procedure PreviewClick(Sender: TObject);
- procedure PrintGridReport1PrintFooter(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- dem04form: Tdem04form;
-
- implementation
-
- {$R *.DFM}
-
- procedure Tdem04form.PreviewClick(Sender: TObject);
- begin
- PrintGridReport1.Orientation := Landscape;
-
- { Do not total VendorNo fields, but do all the rest }
- PrintGridReport1.SetPrintTotal('VendorNo', False);
- PrintGridReport1.SetPrintTotal('PartNo', False);
-
- PrintGridReport1.Execute;
-
- end;
-
- procedure Tdem04form.PrintGridReport1PrintFooter(Sender: TObject);
- begin
- PrintGridReport1.FrameStyleBottom := frDoubleThin;
- PrintGridReport1.FrameStyleTop := frSingleThin;
- end;
-
- end.
-