Kardeş önce yeni bir proce oluştur.
Sonra formun üzerinde sağ tılayıp view as text komutunu ver .
gelen sayfada yazılı olanları si ve aşağıdaki dfm dosyasını yapıştır.
Kod: Tümünü seç
object Form1: TForm1
Left = 258
Top = 207
AutoScroll = False
Caption = 'Form1'
ClientHeight = 218
ClientWidth = 636
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Scaled = False
PixelsPerInch = 96
TextHeight = 13
object DBGrid1: TDBGrid
Left = 139
Top = 0
Width = 497
Height = 218
Align = alRight
DataSource = DataSource1
TabOrder = 0
TitleFont.Charset = DEFAULT_CHARSET
TitleFont.Color = clWindowText
TitleFont.Height = -11
TitleFont.Name = 'MS Sans Serif'
TitleFont.Style = []
Columns = <
item
Expanded = False
FieldName = 'OrderNo'
Visible = True
end
item
Expanded = False
FieldName = 'CustNo'
Visible = True
end
item
Expanded = False
FieldName = 'SaleDate'
Visible = True
end
item
Expanded = False
FieldName = 'ShipDate'
Visible = True
end
item
Expanded = False
FieldName = 'EmpNo'
Visible = True
end
item
Expanded = False
FieldName = 'ShipToContact'
Visible = True
end
item
Expanded = False
FieldName = 'ShipToAddr1'
Visible = True
end
item
Expanded = False
FieldName = 'ShipToAddr2'
Visible = True
end
item
Expanded = False
FieldName = 'ShipToCity'
Visible = True
end
item
Expanded = False
FieldName = 'ShipToState'
Visible = True
end
item
Expanded = False
FieldName = 'ShipToZip'
Visible = True
end
item
Expanded = False
FieldName = 'ShipToCountry'
Visible = True
end
item
Expanded = False
FieldName = 'ShipToPhone'
Visible = True
end
item
Expanded = False
FieldName = 'ShipVIA'
Visible = True
end
item
Expanded = False
FieldName = 'PO'
Visible = True
end
item
Expanded = False
FieldName = 'Terms'
Visible = True
end
item
Expanded = False
FieldName = 'PaymentMethod'
Visible = True
end
item
Expanded = False
FieldName = 'ItemsTotal'
Visible = True
end
item
Expanded = False
FieldName = 'TaxRate'
Visible = True
end
item
Expanded = False
FieldName = 'Freight'
Visible = True
end
item
Expanded = False
FieldName = 'AmountPaid'
Visible = True
end>
end
object QuickRep1: TQuickRep
Left = -8
Top = 228
Width = 794
Height = 1123
Frame.Color = clBlack
Frame.DrawTop = False
Frame.DrawBottom = False
Frame.DrawLeft = False
Frame.DrawRight = False
DataSet = Query1
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Arial'
Font.Style = []
Functions.Strings = (
'PAGENUMBER'
'COLUMNNUMBER'
'REPORTTITLE')
Functions.DATA = (
'0'
'0'
'''''')
Options = [FirstPageHeader, LastPageFooter]
Page.Columns = 1
Page.Orientation = poLandscape
Page.PaperSize = Custom
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 PageFooterBand1: TQRBand
Left = 38
Top = 82
Width = 718
Height = 22
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 = (
58.2083333333333
1899.70833333333)
BandType = rbPageFooter
object QRExpr1: TQRExpr
Left = 613
Top = 0
Width = 105
Height = 15
Frame.Color = clBlack
Frame.DrawTop = False
Frame.DrawBottom = False
Frame.DrawLeft = False
Frame.DrawRight = False
Size.Values = (
39.6875
1621.89583333333
0
277.8125)
Alignment = taRightJustify
AlignToBand = True
AutoSize = True
AutoStretch = False
Color = clWhite
ResetAfterPrint = False
Transparent = False
WordWrap = True
Expression = '''Page '' + PageNumber'
FontSize = 8
end
end
object ColumnHeaderBand1: TQRBand
Left = 38
Top = 38
Width = 718
Height = 22
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 = (
58.2083333333333
1899.70833333333)
BandType = rbColumnHeader
object QRLabel1: TQRLabel
Left = 1
Top = 0
Width = 71
Height = 15
Frame.Color = clBlack
Frame.DrawTop = False
Frame.DrawBottom = True
Frame.DrawLeft = False
Frame.DrawRight = False
Size.Values = (
39.6875
2.64583333333333
0
187.854166666667)
Alignment = taLeftJustify
AlignToBand = False
AutoSize = False
AutoStretch = False
Caption = 'OrderNo'
Color = clWhite
Transparent = False
WordWrap = True
FontSize = 8
end
object QRLabel2: TQRLabel
Left = 82
Top = 0
Width = 71
Height = 15
Frame.Color = clBlack
Frame.DrawTop = False
Frame.DrawBottom = True
Frame.DrawLeft = False
Frame.DrawRight = False
Size.Values = (
39.6875
216.958333333333
0
187.854166666667)
Alignment = taLeftJustify
AlignToBand = False
AutoSize = False
AutoStretch = False
Caption = 'CustNo'
Color = clWhite
Transparent = False
WordWrap = True
FontSize = 8
end
object QRLabel3: TQRLabel
Left = 163
Top = 0
Width = 127
Height = 15
Frame.Color = clBlack
Frame.DrawTop = False
Frame.DrawBottom = True
Frame.DrawLeft = False
Frame.DrawRight = False
Size.Values = (
39.6875
431.270833333333
0
336.020833333333)
Alignment = taLeftJustify
AlignToBand = False
AutoSize = False
AutoStretch = False
Caption = 'SaleDate'
Color = clWhite
Transparent = False
WordWrap = True
FontSize = 8
end
object QRLabel4: TQRLabel
Left = 300
Top = 0
Width = 127
Height = 15
Frame.Color = clBlack
Frame.DrawTop = False
Frame.DrawBottom = True
Frame.DrawLeft = False
Frame.DrawRight = False
Size.Values = (
39.6875
793.75
0
336.020833333333)
Alignment = taLeftJustify
AlignToBand = False
AutoSize = False
AutoStretch = False
Caption = 'ShipDate'
Color = clWhite
Transparent = False
WordWrap = True
FontSize = 8
end
object QRLabel5: TQRLabel
Left = 437
Top = 0
Width = 71
Height = 15
Frame.Color = clBlack
Frame.DrawTop = False
Frame.DrawBottom = True
Frame.DrawLeft = False
Frame.DrawRight = False
Size.Values = (
39.6875
1156.22916666667
0
187.854166666667)
Alignment = taLeftJustify
AlignToBand = False
AutoSize = False
AutoStretch = False
Caption = 'EmpNo'
Color = clWhite
Transparent = False
WordWrap = True
FontSize = 8
end
object QRLabel6: TQRLabel
Left = 518
Top = 0
Width = 141
Height = 15
Frame.Color = clBlack
Frame.DrawTop = False
Frame.DrawBottom = True
Frame.DrawLeft = False
Frame.DrawRight = False
Size.Values = (
39.6875
1370.54166666667
0
373.0625)
Alignment = taLeftJustify
AlignToBand = False
AutoSize = False
AutoStretch = False
Caption = 'ShipToContact'
Color = clWhite
Transparent = False
WordWrap = True
FontSize = 8
end
object QRLabel7: TQRLabel
Left = 669
Top = 0
Width = 43
Height = 15
Frame.Color = clBlack
Frame.DrawTop = False
Frame.DrawBottom = True
Frame.DrawLeft = False
Frame.DrawRight = False
Size.Values = (
39.6875
1770.0625
0
113.770833333333)
Alignment = taLeftJustify
AlignToBand = False
AutoSize = False
AutoStretch = False
Caption = 'Terms'
Color = clWhite
Transparent = False
WordWrap = True
FontSize = 8
end
end
object DetailBand1: TQRBand
Left = 38
Top = 60
Width = 718
Height = 22
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 = (
58.2083333333333
1899.70833333333)
BandType = rbDetail
object QRExpr2: TQRExpr
Left = 1
Top = 0
Width = 71
Height = 15
Frame.Color = clBlack
Frame.DrawTop = False
Frame.DrawBottom = False
Frame.DrawLeft = False
Frame.DrawRight = False
Size.Values = (
39.6875
2.64583333333333
0
187.854166666667)
Alignment = taRightJustify
AlignToBand = False
AutoSize = False
AutoStretch = False
Color = clWhite
ResetAfterPrint = False
Transparent = False
WordWrap = True
Expression = '[OrderNo]'
FontSize = 8
end
object QRExpr3: TQRExpr
Left = 82
Top = 0
Width = 71
Height = 15
Frame.Color = clBlack
Frame.DrawTop = False
Frame.DrawBottom = False
Frame.DrawLeft = False
Frame.DrawRight = False
Size.Values = (
39.6875
216.958333333333
0
187.854166666667)
Alignment = taRightJustify
AlignToBand = False
AutoSize = False
AutoStretch = False
Color = clWhite
ResetAfterPrint = False
Transparent = False
WordWrap = True
Expression = '[CustNo]'
FontSize = 8
end
object QRExpr4: TQRExpr
Left = 163
Top = 0
Width = 127
Height = 15
Frame.Color = clBlack
Frame.DrawTop = False
Frame.DrawBottom = False
Frame.DrawLeft = False
Frame.DrawRight = False
Size.Values = (
39.6875
431.270833333333
0
336.020833333333)
Alignment = taLeftJustify
AlignToBand = False
AutoSize = False
AutoStretch = False
Color = clWhite
ResetAfterPrint = False
Transparent = False
WordWrap = True
Expression = '[SaleDate]'
FontSize = 8
end
object QRExpr5: TQRExpr
Left = 300
Top = 0
Width = 127
Height = 15
Frame.Color = clBlack
Frame.DrawTop = False
Frame.DrawBottom = False
Frame.DrawLeft = False
Frame.DrawRight = False
Size.Values = (
39.6875
793.75
0
336.020833333333)
Alignment = taLeftJustify
AlignToBand = False
AutoSize = False
AutoStretch = False
Color = clWhite
ResetAfterPrint = False
Transparent = False
WordWrap = True
Expression = '[ShipDate]'
FontSize = 8
end
object QRExpr6: TQRExpr
Left = 437
Top = 0
Width = 71
Height = 15
Frame.Color = clBlack
Frame.DrawTop = False
Frame.DrawBottom = False
Frame.DrawLeft = False
Frame.DrawRight = False
Size.Values = (
39.6875
1156.22916666667
0
187.854166666667)
Alignment = taRightJustify
AlignToBand = False
AutoSize = False
AutoStretch = False
Color = clWhite
ResetAfterPrint = False
Transparent = False
WordWrap = True
Expression = '[EmpNo]'
FontSize = 8
end
object QRExpr7: TQRExpr
Left = 518
Top = 0
Width = 141
Height = 15
Frame.Color = clBlack
Frame.DrawTop = False
Frame.DrawBottom = False
Frame.DrawLeft = False
Frame.DrawRight = False
Size.Values = (
39.6875
1370.54166666667
0
373.0625)
Alignment = taLeftJustify
AlignToBand = False
AutoSize = False
AutoStretch = False
Color = clWhite
ResetAfterPrint = False
Transparent = False
WordWrap = True
Expression = '[ShipToContact]'
FontSize = 8
end
object QRExpr8: TQRExpr
Left = 669
Top = 0
Width = 43
Height = 15
Frame.Color = clBlack
Frame.DrawTop = False
Frame.DrawBottom = False
Frame.DrawLeft = False
Frame.DrawRight = False
Size.Values = (
39.6875
1770.0625
0
113.770833333333)
Alignment = taLeftJustify
AlignToBand = False
AutoSize = False
AutoStretch = False
Color = clWhite
ResetAfterPrint = False
Transparent = False
WordWrap = True
Expression = '[Terms]'
FontSize = 8
end
end
end
object Button1: TButton
Left = 16
Top = 8
Width = 75
Height = 25
Caption = 'Raporla'
TabOrder = 2
OnClick = Button1Click
end
object DataSource1: TDataSource
DataSet = Query1
Left = 72
Top = 32
end
object Query1: TQuery
Active = True
DatabaseName = 'DBDEMOS'
SQL.Strings = (
'select * from orders'
'where shipdate>=''01.01.1990''')
Left = 24
Top = 16
object Query1OrderNo: TFloatField
FieldName = 'OrderNo'
Origin = 'DBDEMOS."orders.DB".OrderNo'
end
object Query1CustNo: TFloatField
FieldName = 'CustNo'
Origin = 'DBDEMOS."orders.DB".CustNo'
end
object Query1SaleDate: TDateTimeField
FieldName = 'SaleDate'
Origin = 'DBDEMOS."orders.DB".SaleDate'
end
object Query1ShipDate: TDateTimeField
FieldName = 'ShipDate'
Origin = 'DBDEMOS."orders.DB".ShipDate'
end
object Query1EmpNo: TIntegerField
FieldName = 'EmpNo'
Origin = 'DBDEMOS."orders.DB".EmpNo'
end
object Query1ShipToContact: TStringField
FieldName = 'ShipToContact'
Origin = 'DBDEMOS."orders.DB".ShipToContact'
end
object Query1ShipToAddr1: TStringField
FieldName = 'ShipToAddr1'
Origin = 'DBDEMOS."orders.DB".ShipToAddr1'
Size = 30
end
object Query1ShipToAddr2: TStringField
FieldName = 'ShipToAddr2'
Origin = 'DBDEMOS."orders.DB".ShipToAddr2'
Size = 30
end
object Query1ShipToCity: TStringField
FieldName = 'ShipToCity'
Origin = 'DBDEMOS."orders.DB".ShipToCity'
Size = 15
end
object Query1ShipToState: TStringField
FieldName = 'ShipToState'
Origin = 'DBDEMOS."orders.DB".ShipToState'
end
object Query1ShipToZip: TStringField
FieldName = 'ShipToZip'
Origin = 'DBDEMOS."orders.DB".ShipToZip'
Size = 10
end
object Query1ShipToCountry: TStringField
FieldName = 'ShipToCountry'
Origin = 'DBDEMOS."orders.DB".ShipToCountry'
end
object Query1ShipToPhone: TStringField
FieldName = 'ShipToPhone'
Origin = 'DBDEMOS."orders.DB".ShipToPhone'
Size = 15
end
object Query1ShipVIA: TStringField
FieldName = 'ShipVIA'
Origin = 'DBDEMOS."orders.DB".ShipVIA'
Size = 7
end
object Query1PO: TStringField
FieldName = 'PO'
Origin = 'DBDEMOS."orders.DB".PO'
Size = 15
end
object Query1Terms: TStringField
FieldName = 'Terms'
Origin = 'DBDEMOS."orders.DB".Terms'
Size = 6
end
object Query1PaymentMethod: TStringField
FieldName = 'PaymentMethod'
Origin = 'DBDEMOS."orders.DB".PaymentMethod'
Size = 7
end
object Query1ItemsTotal: TCurrencyField
FieldName = 'ItemsTotal'
Origin = 'DBDEMOS."orders.DB".ItemsTotal'
end
object Query1TaxRate: TFloatField
FieldName = 'TaxRate'
Origin = 'DBDEMOS."orders.DB".TaxRate'
end
object Query1Freight: TCurrencyField
FieldName = 'Freight'
Origin = 'DBDEMOS."orders.DB".Freight'
end
object Query1AmountPaid: TCurrencyField
FieldName = 'AmountPaid'
Origin = 'DBDEMOS."orders.DB".AmountPaid'
end
end
end
ekrandaki kodları silip aşağıdaki kodlarıda oraya yapıştır.
Kod: Tümünü seç
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, QRCtrls, QuickRpt, ExtCtrls, DB, DBTables, Grids,
DBGrids;
type
TForm1 = class(TForm)
DataSource1: TDataSource;
DBGrid1: TDBGrid;
Query1: TQuery;
Query1OrderNo: TFloatField;
Query1CustNo: TFloatField;
Query1SaleDate: TDateTimeField;
Query1ShipDate: TDateTimeField;
Query1EmpNo: TIntegerField;
Query1ShipToContact: TStringField;
Query1ShipToAddr1: TStringField;
Query1ShipToAddr2: TStringField;
Query1ShipToCity: TStringField;
Query1ShipToState: TStringField;
Query1ShipToZip: TStringField;
Query1ShipToCountry: TStringField;
Query1ShipToPhone: TStringField;
Query1ShipVIA: TStringField;
Query1PO: TStringField;
Query1Terms: TStringField;
Query1PaymentMethod: TStringField;
Query1ItemsTotal: TCurrencyField;
Query1TaxRate: TFloatField;
Query1Freight: TCurrencyField;
Query1AmountPaid: TCurrencyField;
QuickRep1: TQuickRep;
PageFooterBand1: TQRBand;
QRExpr1: TQRExpr;
ColumnHeaderBand1: TQRBand;
QRLabel1: TQRLabel;
QRLabel2: TQRLabel;
QRLabel3: TQRLabel;
QRLabel4: TQRLabel;
QRLabel5: TQRLabel;
QRLabel6: TQRLabel;
QRLabel7: TQRLabel;
DetailBand1: TQRBand;
QRExpr2: TQRExpr;
QRExpr3: TQRExpr;
QRExpr4: TQRExpr;
QRExpr5: TQRExpr;
QRExpr6: TQRExpr;
QRExpr7: TQRExpr;
QRExpr8: TQRExpr;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
quickrep1.Preview;
end;
end.
Kola gelsin.