Pergunta : Relatar a ot poucos registros

Minha tabela tem 100 registros. Eu preciso algum tipo do relatório uma tabela em 20 folhas * 5 records.
qualquer outra coisa semelhante o
-----------------------
| field1|field2|field3|
-----------------------*
5 do *
3 do
1 * *
2 * * *
4 * * *
------------------------o
this é primeiro page.
-----------------------
| field1|field2|field3|
-----------------------*
10 do *
8 do
6 * *
7 * * *
9 * * *
------------------------o
second e assim o on
please dá-me um axamples
tanks em advise.
class= do

Resposta : Relatar a ot poucos registros

Minha amostra simples

Criar um contador.
Em qrband.beforeprint inc o contador
Na verificação de qrband.afterprint o contador, e se é como a força necessário uma página nova.

Ver o exemplo do código

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
unidade Unit1;

relação

usos
  Windows, mensagens, SysUtils, variações, classes, gráficos, controles, formulários,
  Diálogos, StdCtrls, QuickRpt, QRCtrls, ExtCtrls, DB, DBTables;

tipo
  TForm1 = classe (TForm)
    Table1: TTable;
    QuickRep1: TQuickRep;
    QRBand2: TQRBand;
    QRDBText1: TQRDBText;
    QRDBText2: TQRDBText;
    QRDBText3: TQRDBText;
    Button1: TButton;
    procedimento Button1Click (remetente: TObject);
    procedimento QRBand2BeforePrint (remetente: TQRCustomBand; var PrintBand: Bôoleano);
    procedimento QRBand2AfterPrint (remetente: TQRCustomBand; BandPrinted: Bôoleano);
  confidencial
    {Declarações confidenciais}
  público
    {Declarações públicas}
  extremidade;

var
  Form1: TForm1;
  i: Inteiro;

execução

{$R *.dfm}

procedimento TForm1.Button1Click (remetente: TObject);
começar
  i: = 0;
  QuickRep1.Preview;
extremidade;

procedimento TForm1.QRBand2AfterPrint (remetente: TQRCustomBand; BandPrinted: Bôoleano);
começar
  se modificação 5 = 0 de i então
    QuickRep1.NewPage;
extremidade;

procedimento TForm1.QRBand2BeforePrint (remetente: TQRCustomBand; var PrintBand: Bôoleano);
começar
  Inc (i);
extremidade;

extremidade.


o formulário

objeto Form1: TForm1
  Esquerda = 245
  Parte superior = 92
  Subtítulo = “Form1”
  ClientHeight = 464
  ClientWidth = 854
  Cor = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = “Tahoma”
  Font.Style = []
  OldCreateOrder = falso
  Escalado = falso
  PixelsPerInch = 96
  TextHeight = 13
  objeto QuickRep1: TQuickRep
    Esquerda = 76
    Parte superior = 54
    Largura = 794
    Altura = 1123
    Frame.Color = clBlack
    Frame.DrawTop = falso
    Frame.DrawBottom = falso
    Frame.DrawLeft = falso
    Frame.DrawRight = falso
    Série de dados = Table1
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -13
    Font.Name = “Arial”
    Font.Style = []
    Functions.Strings = (
      “PAGENUMBER”
      “COLUMNNUMBER”
      “REPORTTITLE ")
    Functions.DATA = (
      “0”
      “0”
      #39#39)
    Opções = [FirstPageHeader, LastPageFooter]
    Page.Columns = 1
    Page.Orientation = poPortrait
    Page.PaperSize = A4
    Page.Values = (
      100.000000000000000000
      2970.000000000000000000
      100.000000000000000000
      2100.000000000000000000
      100.000000000000000000
      100.000000000000000000
      0.000000000000000000)
    PrinterSettings.Copies = 1
    PrinterSettings.OutputBin = automóvel
    PrinterSettings.Duplex = falso
    PrinterSettings.FirstPage = 0
    PrinterSettings.LastPage = 0
    PrinterSettings.UseStandardprinter = falso
    PrinterSettings.UseCustomBinCode = falso
    PrinterSettings.CustomBinCode = 0
    PrinterSettings.ExtendedDuplex = 0
    PrinterSettings.UseCustomPaperCode = falso
    PrinterSettings.CustomPaperCode = 0
    PrinterSettings.PrintMetaFile = falso
    PrinterSettings.PrintQuality = 0
    PrinterSettings.Collate = 0
    PrinterSettings.ColorOption = 0
    PrintIfEmpty = retifica
    SnapToGrid = retifica
    Unidades = milímetro
    Zumbido = 100
    PrevFormStyle = fsNormal
    PreviewInitialState = wsNormal
    PrevInitialZoom = qrZoomToFit
    objeto QRBand2: TQRBand
      Esquerda = 38
      Parte superior = 38
      Largura = 718
      Altura = 40
      Frame.Color = clBlack
      Frame.DrawTop = falso
      Frame.DrawBottom = falso
      Frame.DrawLeft = falso
      Frame.DrawRight = falso
      AfterPrint = QRBand2AfterPrint
      AlignToBottom = falso
      BeforePrint = QRBand2BeforePrint
      Cor = clWhite
      TransparentBand = falso
      ForceNewColumn = falso
      ForceNewPage = falso
      Size.Values = (
        105.833333333333300000
        1899.708333333333000000)
      PreCaluculateBandHeight = falso
      KeepOnOnePage = falso
      BandType = rbDetail
      objeto QRDBText1: TQRDBText
        Esquerda = 18
        Parte superior = 12
        Largura = 44
        Altura = 17
        Frame.Color = clBlack
        Frame.DrawTop = falso
        Frame.DrawBottom = falso
        Frame.DrawLeft = falso
        Frame.DrawRight = falso
        Size.Values = (
          44.979166666666670000
          47.625000000000000000
          31.750000000000000000
          116.416666666666700000)
        O alinhamento = taLeftJustify
        AlignToBand = falso
        AutoSize = retifica
        AutoStretch = falso
        Cor = clWhite
        Série de dados = Table1
        DataField = “CustNo”
        Transparente = falso
        A volta à linha automática = retifica
        FontSize = 10
      extremidade
      objeto QRDBText2: TQRDBText
        Esquerda = 104
        Parte superior = 12
        Largura = 56
        Altura = 17
        Frame.Color = clBlack
        Frame.DrawTop = falso
        Frame.DrawBottom = falso
        Frame.DrawLeft = falso
        Frame.DrawRight = falso
        Size.Values = (
          44.979166666666670000
          275.166666666666700000
          31.750000000000000000
          148.166666666666700000)
        O alinhamento = taLeftJustify
        AlignToBand = falso
        AutoSize = retifica
        AutoStretch = falso
        Cor = clWhite
        Série de dados = Table1
        DataField = “companhia”
        Transparente = falso
        A volta à linha automática = retifica
        FontSize = 10
      extremidade
      objeto QRDBText3: TQRDBText
        Esquerda = 454
        Parte superior = 11
        Largura = 24
        Altura = 17
        Frame.Color = clBlack
        Frame.DrawTop = falso
        Frame.DrawBottom = falso
        Frame.DrawLeft = falso
        Frame.DrawRight = falso
        Size.Values = (
          44.979166666666670000
          1201.208333333333000000
          29.104166666666670000
          63.500000000000000000)
        O alinhamento = taLeftJustify
        AlignToBand = falso
        AutoSize = retifica
        AutoStretch = falso
        Cor = clWhite
        Série de dados = Table1
        DataField = “cidade”
        Transparente = falso
        A volta à linha automática = retifica
        FontSize = 10
      extremidade
    extremidade
  extremidade
  objeto Button1: TButton
    Esquerda = 10
    Parte superior = 12
    Largura = 75
    Altura = 25
    Subtítulo = “Button1”
    TabOrder = 1
    OnClick = Button1Click
  extremidade
  objeto Table1: TTable
    O Ative = retifica
    DatabaseName = “DBDEMOS”
    TableName = “customer.db”
    Esquerda = 228
    Parte superior = 120
  extremidade
extremidade
Outras soluções  
 
programming4us programming4us