PrintOptions PageScaling

Posted by: c.schuller on 16 February 2022, 12:40 am EST

  • Posted 16 February 2022, 12:40 am EST

    Hi there,

    I am using AR14.3 with SectionReport. Our system is generating automatically the PDF report and save the file on the server. Now the report should also print automatically after run. I added the code

    Me.Document.Print(False, False, False)

    on the _ReportEnd. This works also fine, but the Margins are set to 0 so the printer cuts some informations from the top & buttom line. I found a feature named PageScaling and added to the _ReportEnd

    Me.Document.PrintOptions.PageScaling = Extensibility.Printing.PageScaling.FitToPrintableArea

    but nothing happend when the report runs. Is there an other solution or trick to fit the report on the pagesize?

    Thanks in advance.

  • Marked as Answer

    Replied 23 February 2022, 3:00 pm EST


    We apologize for the delayed response, You can try updating the Margins within the ReportStart event to ensure that the report gets printed properly. Please refer to the code snippet below:

    private void SectionReport1_ReportStart(object sender, EventArgs e)
    this.PageSettings.Margins= new GrapeCity.ActiveReports.Document.Section.Margins(1, 1, 1, 1);

    You may also refer to the sample application implementing the same below.


    Dushyant Sharma
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels