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

Change PaperSize in BeforePrint

edited July 2005 in RAP
I'm trying to change the pagesize of the document i'm printing in the
beforeprint.
This is because i want (if shown on screen) the report to be presented as 1
page, when on paper it should be printed on several.
I'm doing this with a parameter because testing the DeviceType doesn't work
(or always gives screen) when used in a WebTier.
begin

if Report.Parameters.Items['ppOnePage'].Value = 'Y' then

begin

Report.PrinterSetup.PaperName := 'Custom';

Report.PrinterSetup.PaperWidth := 2000;

Report.PrinterSetup.PaperHeight := 2000;

OutDevice := 'Custom';

end;



When using the OutDevice in a label i can see that it's working but the
pagesize is not modified.



Any suggestions

Comments

  • edited July 2005

    One option is to try using one of the new events that we added for RB 9.
    Report.OnInitializeParameters or Report.BeforeOpenDataPipelines.

    The other option is to set Report.Engine.Page.PrinterSetup from the
    BeforePrint event



    --
    Nard Moseley
    Digital Metaphors Corporation
    http://www.digital-metaphors.com


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.