Quickreport labels

You can use Quickreport (using columns) to print databaserecords to labels using labelpaper from Avery or HP with (by exp.) 18 labels on one sheet.

When I print one label, a complete label-sheet is lost. Does anyone know a way to start printing at  label x on the sheet ?
RichardBorstAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

kretzschmarCommented:
hi richard,

you can do something like this:
sample qr-unit:

unit Unit2;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  Db, DBTables, QuickRpt, Qrctrls, ExtCtrls;

type
  TQRLabelForm = class(TForm)
    QuickRep1: TQuickRep;
    DetailBand1: TQRBand;
    MasterTable: TTable;
    QRDBText1: TQRDBText;
    procedure DetailBand1BeforePrint(Sender: TQRCustomBand;
      var PrintBand: Boolean);
    procedure QRDBText1Print(sender: TObject; var Value: String);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  QRLabelForm: TQRLabelForm;
  StartOnLabel : Integer = 0;
implementation

{$R *.DFM}

procedure TQRLabelForm.DetailBand1BeforePrint(Sender: TQRCustomBand;
  var PrintBand: Boolean);
  var I : Integer;
begin
  if StartOnLabel > 0 then
  begin
    MasterTable.First;  //reAdjust to First record
    dec(StartOnLabel);
  end;
end;

procedure TQRLabelForm.QRDBText1Print(sender: TObject; var Value: String);
begin
  if StartOnLabel > 0 then Value := '';  //do print nothing
end;

end.

to call

procedure TForm1.Button1Click(Sender: TObject);
begin
  StartOnLabel := 5;  //Start at label
  QRLabelForm.quickrep1.Preview;  //show preview
end;

try it out

meikl
0
kretzschmarCommented:
hi richard,
any results?
meikl
0
kretzschmarCommented:
preventive lock
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
RichardBorstAuthor Commented:
Thanks.It work's.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.