unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, ADODB, QuickRpt, ExtCtrls, QRCtrls;
type
TForm1 = class(TForm)
QuickRep1: TQuickRep;
TitleBand1: TQRBand;
DetailBand1: TQRBand;
ADODataSet1: TADODataSet;
ADODataSet1a: TStringField;
ADODataSet1b: TIntegerField;
QRDBText1: TQRDBText;
QRDBText2: TQRDBText;
PageFooterBand1: TQRBand;
QRLabel1: TQRLabel;
QRExpr1: TQRExpr;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
var
i: integer;
begin
ADODataSet1.CreateDataSet;
ADODataSet1.Open;
for i:=1 to 65do
ADODataSet1.InsertRecord(['sad', i]);
QuickRep1.Preview;
end;
end.
object Form1: TForm1
Left = 192
Top = 103
Width = 544
Height = 375
VertScrollBar.Position = 468
Caption = 'Form1'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Scaled = False
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
object QuickRep1: TQuickRep
Left = -32
Top = -212
Width = 794
Height = 1123
Frame.Color = clBlack
Frame.DrawTop = False
Frame.DrawBottom = False
Frame.DrawLeft = False
Frame.DrawRight = False
DataSet = ADODataSet1
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Arial'
Font.Style = []
Functions.Strings = (
'PAGENUMBER'
'COLUMNNUMBER'
'REPORTTITLE')
Functions.DATA = (
'0'
'0'
'''''')
Options = [FirstPageHeader, LastPageFooter]
Page.Columns = 2
Page.Orientation = poPortrait
Page.PaperSize = A4
Page.Values = (
100
2970
100
2100
100
100
0)
PrinterSettings.Copies = 1
PrinterSettings.Duplex = False
PrinterSettings.FirstPage = 0
PrinterSettings.LastPage = 0
PrinterSettings.OutputBin = Auto
PrintIfEmpty = True
SnapToGrid = True
Units = MM
Zoom = 100
object TitleBand1: TQRBand
Left = 38
Top = 38
Width = 718
Height = 99
Frame.Color = clBlack
Frame.DrawTop = False
Frame.DrawBottom = False
Frame.DrawLeft = False
Frame.DrawRight = False
AlignToBottom = False
Color = clWhite
ForceNewColumn = False
ForceNewPage = False
Size.Values = (
261.9375
1899.70833333333)
BandType = rbTitle
end
object DetailBand1: TQRBand
Left = 38
Top = 137
Width = 359
Height = 19
Frame.Color = clBlack
Frame.DrawTop = False
Frame.DrawBottom = False
Frame.DrawLeft = False
Frame.DrawRight = False
AlignToBottom = False
Color = clWhite
ForceNewColumn = False
ForceNewPage = False
Size.Values = (
50.2708333333333
949.854166666667)
BandType = rbDetail
object QRDBText1: TQRDBText
Left = 40
Top = 0
Width = 8
Height = 17
Frame.Color = clBlack
Frame.DrawTop = False
Frame.DrawBottom = False
Frame.DrawLeft = False
Frame.DrawRight = False
Size.Values = (
44.9791666666667
105.833333333333
0
21.1666666666667)
Alignment = taLeftJustify
AlignToBand = False
AutoSize = True
AutoStretch = False
Color = clWhite
DataSet = ADODataSet1
DataField = 'a'
Transparent = False
WordWrap = True
FontSize = 10
end
object QRDBText2: TQRDBText
Left = 192
Top = 0
Width = 8
Height = 17
Frame.Color = clBlack
Frame.DrawTop = False
Frame.DrawBottom = False
Frame.DrawLeft = False
Frame.DrawRight = False
Size.Values = (
44.9791666666667
508
0
21.1666666666667)
Alignment = taLeftJustify
AlignToBand = False
AutoSize = True
AutoStretch = False
Color = clWhite
DataSet = ADODataSet1
DataField = 'b'
Transparent = False
WordWrap = True
FontSize = 10
end
end
object PageFooterBand1: TQRBand
Left = 38
Top = 156
Width = 718
Height = 93
Frame.Color = clBlack
Frame.DrawTop = False
Frame.DrawBottom = False
Frame.DrawLeft = False
Frame.DrawRight = False
AlignToBottom = False
Color = clWhite
ForceNewColumn = False
ForceNewPage = False
Size.Values = (
246.0625
1899.70833333333)
BandType = rbPageFooter
object QRLabel1: TQRLabel
Left = 139
Top = 64
Width = 131
Height = 17
Frame.Color = clBlack
Frame.DrawTop = False
Frame.DrawBottom = False
Frame.DrawLeft = False
Frame.DrawRight = False
Size.Values = (
44.9791666666667
367.770833333333
169.333333333333
346.604166666667)
Alignment = taLeftJustify
AlignToBand = False
AutoSize = True
AutoStretch = False
Caption = 'SUM(ADODataSet1.b)'
Color = clWhite
Transparent = False
WordWrap = True
FontSize = 10
end
object QRExpr1: TQRExpr
Left = 307
Top = 64
Width = 131
Height = 17
Frame.Color = clBlack
Frame.DrawTop = False
Frame.DrawBottom = False
Frame.DrawLeft = False
Frame.DrawRight = False
Size.Values = (
44.9791666666667
812.270833333333
169.333333333333
346.604166666667)
Alignment = taLeftJustify
AlignToBand = False
AutoSize = True
AutoStretch = False
Color = clWhite
ResetAfterPrint = False
Transparent = False
WordWrap = True
Expression = 'SUM(ADODataSet1.b)'
FontSize = 10
end
end
end
object ADODataSet1: TADODataSet
Parameters = <>
Left = 40
Top = 24
object ADODataSet1a: TStringField
FieldName = 'a'
Size = 10
end
object ADODataSet1b: TIntegerField
FieldName = 'b'
end
end
end