unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
QuickRpt, QRCtrls, StdCtrls;
type
TForm1 =
class(TForm)
btnDrucken: TButton;
procedure btnDruckenClick(Sender: TObject);
private
{ Private-Deklarationen }
procedure ArrayDrucken(Arr:
array of Integer);
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
{ TForm1 }
procedure TForm1.ArrayDrucken(Arr:
array of Integer);
var i, aTop:Integer;
begin
aTop := 0;
with TQuickRep.Create(
nil)
do begin
Bands.HasDetail := True;
for i := Low(Arr)
to High(Arr)
do
if Arr[i] <> 0
then
with TQRLabel(Bands.DetailBand.AddPrintable(TQRLabel))
do begin
Left := 0;
Top := aTop + Font.Size * 2;
aTop := Top;
AutoSize := True;
Caption := IntToStr(Arr[i]);
Font.Style := [fsBold];
end;
// End With
Font.Size := 8;
Bands.HasPageFooter := True;
with TQRSysData(Bands.PageFooterBand.AddPrintable(TQRSysData))
do begin
Data := qrsDate;
AlignToBand := True;
Alignment := taRightJustify;
Top := 2;
end;
// end with
with TQRSysData(Bands.PageFooterBand.AddPrintable(TQRSysData))
do begin
Data := qrsPageNumber;
Text := '
Seite ';
AlignToBand := True;
Alignment := taLeftJustify;
Top := 2;
end;
// end with
PreviewModal;
Free;
end;
end;
procedure TForm1.btnDruckenClick(Sender: TObject);
begin
ArrayDrucken([1, 2, 3, 0, 6, 5, 0, 3, 2, 3, 0, 6, 5, 0, 3, 2, 3, 0, 6, 5]);
end;
end.