Board index » delphi » How to print multiple copies of same page w/QR

How to print multiple copies of same page w/QR

I have a QR report printing from a Query that works very well. It creates
a 17 page report.

The US Gov. now says they need 4 copies of it but, because of their form
layout, I need to print 4 copies of Page 1, followed by 4 copies of Page
2, etc. If I just run it out and call the Print property 4 times, I get
pages 1 - 17 then it loops back and does it three more times.

Is there a way to print multiple copies of the first page, followed by the
2nd page and so on?

Jeff

 

Re:How to print multiple copies of same page w/QR


Quote
jeffs63...@aol.com wrote:

> I have a QR report printing from a Query that works very well. It creates
> a 17 page report.

> The US Gov. now says they need 4 copies of it but, because of their form
> layout, I need to print 4 copies of Page 1, followed by 4 copies of Page
> 2, etc. If I just run it out and call the Print property 4 times, I get
> pages 1 - 17 then it loops back and does it three more times.

> Is there a way to print multiple copies of the first page, followed by the
> 2nd page and so on?

> Jeff

Jeff,

Quote
>From where *I* work, that's called printing it 'uncollated'.  Here's

what *I* did.  First I set up a checkbox similar to Word's Print Dialog
Collate box.  Then, at print time, if the user has selected more than 1
copy I run this set of code (in pseudocode here.)

if chkCollate.Checked then
begin
  for I := 1 to NumPages do
  begin
    QRPrinter.StartRange := I;
    QRPrinter.EndRange := I;
    for Copies := 1 to NumCopies do
    begin
      QRPrinter.Print;
    end;
  end;
end
else
begin
  QRPrinter.StartRange := 1;
  QRPrinter.EndRange := NumPages
  for Copies := 1 to NumCopies do
  begin
    QRPrinter.Print;
  end;
end;

This is just rough pseudocode, but it gives the general idea.

HTH

Derek

Re:How to print multiple copies of same page w/QR


With Delphi-1 and Win3.11 there seems to be Collate Copies option in
printer setting dialog that should do the job. I have not tested if
this is the same dialog when printing with and without Qreport.

Quote
jeffs63...@aol.com wrote:

> I have a QR report printing from a Query that works very well. It creates
> a 17 page report.

> The US Gov. now says they need 4 copies of it but, because of their form
> layout, I need to print 4 copies of Page 1, followed by 4 copies of Page
> 2, etc. If I just run it out and call the Print property 4 times, I get
> pages 1 - 17 then it loops back and does it three more times.

> Is there a way to print multiple copies of the first page, followed by the
> 2nd page and so on?

> Jeff

Re:How to print multiple copies of same page w/QR


"Derek A. Benner" <dben...@pacbell.net> wrote:

Quote
>>From where *I* work, that's called printing it 'uncollated'.  Here's
>what *I* did.  First I set up a checkbox similar to Word's Print Dialog
>Collate box.  Then, at print time, if the user has selected more than 1
>copy I run this set of code (in pseudocode here.)
>if chkCollate.Checked then
>begin
>  for I := 1 to NumPages do
>  begin
>    QRPrinter.StartRange := I;
>    QRPrinter.EndRange := I;
>    for Copies := 1 to NumCopies do
>    begin
>      QRPrinter.Print;
>    end;
>  end;
>end
>else
>begin
>  QRPrinter.StartRange := 1;
>  QRPrinter.EndRange := NumPages
>  for Copies := 1 to NumCopies do
>  begin
>    QRPrinter.Print;
>  end;
>end;

If your printer-driver supports it, you can use the Copies property of
QRPrinter to set the number of copies. This reduces one for-loop. And
which printer-driver does not support multiple copies nowadays.

Other Threads