Home Devices
New Blog Posts: Merging Reports - Part 1 and Part 2

Print Current Page only

edited November 2002 in Devices
Hopefully this is an easy one to answer!

Is there a way of specifying exactly how many pages are sent to the printer?

I use the following code:

if printReport then
begin
lPrinterDevice := TppPrinterDevice.Create(Self);
try
{add device to report's publisher}
lPrinterDevice.Publisher := ppReport1.Publisher;

lPrinterDevice.Printer.DocumentName := 'Feedback Automate';

{set the printer name for the device}
lPrinterDevice.Printer.PrinterName :=
ppPrinters.DefaultPrinterName;

ppReport1.PrintToDevices;
finally
lPrinterDevice.Free;
end;
end;

However on one of my reports it continuosly prints the same page over and
over again. If I can specify that it should only print one page it would be
great.

Thanks

Matt

Comments

  • edited December 2002
    Is the datapipeline hooked up to the report?

    It should not print infinite pages. See the tech-tips newsgroup for
    configurations in which you can get inifinite pages generated.

    If you want to force the report to print a selected number of pages, then
    you can modify the page list. See the main reports demo #124 for an
    example.

    Cheers,

    Jim Bennett
    Digital Metaphors

This discussion has been closed.