home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1997 May
/
Pcwk0597.iso
/
delphi
/
cbsuite.lzh
/
SU1SRC.ZIP
/
REPDEM08.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1996-12-03
|
1KB
|
60 lines
unit Repdem08;
interface
uses
SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
StdCtrls, Forms, DBCtrls, DB, DBGrids, Buttons, DBTables, Grids,
ExtCtrls, Printers, PrnGridR, CB_Types, CB_MFunc;
type
Tdem08form = class(TForm)
DBGrid1: TDBGrid;
Panel1: TPanel;
DataSource1: TDataSource;
Panel2: TPanel;
Query1: TQuery;
Label1: TLabel;
Label2: TLabel;
Preview: TBitBtn;
Exit: TBitBtn;
Label3: TLabel;
PrintGridReport1: TPrintGridReport;
procedure FormCreate(Sender: TObject);
procedure PreviewClick(Sender: TObject);
private
{ private declarations }
public
end;
var
dem08form: Tdem08form;
implementation
{$R *.DFM}
procedure Tdem08form.FormCreate(Sender: TObject);
begin
Query1.Open;
{ SubTotals will be on field Continent}
PrintGridReport1.SetSubTotalField(1, 'Continent','Continent');
end;
procedure Tdem08form.PreviewClick(Sender: TObject);
begin
Query1.DisableControls;
{ Force Orientation to Portrait }
PrintGridReport1.Orientation := Portrait;
{ and send query for preview }
PrintGridReport1.Execute;
Query1.EnableControls;
end;
end.