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

PrintToDevice and Copies

Hi,
is there a way to use copies for the TppArchiveDevice? I have some calculations in my report if are copies. And this only work wenn I print to a printer.

LArchiveStream := TMemoryStream.Create;
LArchiveDevice := TppArchiveDevice.Create(nil);
LArchiveDevice.OutputStream := LArchiveStream;
LArchiveDevice.Publisher := FGefalldruckDataModel.repGfDruck.Publisher;
FGefalldruckDataModel.repGfDruck.PrintToDevices;
FreeAndNil(LArchiveDevice);

Comments

  • Hi Thomas,

    The RB copies feature is printer specific.

    You could define a Report.Parameters[ ] item called paCopyNo. Then do something like

    var
    liCopies: Integer;
    liIndex: Integer;
    begin
    liCopies := 3;

    for liIndex := 1 to liCopies do
    begin
    ppReport1.Parameters['paCopyNo'].Value := liIndex;

    ppReport1.Print; // or PrintToDevices

    end;


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
Sign In or Register to comment.