Paper Size = ARCustomForm won't print

Posted by: BenAndMarsha on 11 April 2018, 1:43 pm EST

    • Post Options:
    • Link

    Posted 11 April 2018, 1:43 pm EST

    You helped me in a previous issue where the detail section of a report grew unexpectedly when the report was run or displayed in “Preview” mode.

    The fix included adding: Me.PageSettings.PaperKind = System.Drawing.Printing.PaperKind.Custom

    Now, when I print the report, it doesn’t print.

    To make it print, I need to:

    1. In the print dialog, I click on “Properties”
    2. Then I click on “Advanced”
    3. Then I change “Paper Size” from ARCustomForm to “Letter”.

    Two questions:

    1. How can I change the Paper Size to default to Letter? Because of an earlier posted issue, I can’t use the Printer Settings tab of the Report Settings dialog. It’s garbled.

    2. I want to run the report and print the report directly from my code, without user interaction. How can I do this?

    Thanks.

  • Posted 12 April 2018, 1:00 am EST

    Hello,

    1. How can I change the Paper Size to default to Letter? Because of an earlier posted issue, I can’t use the Printer Settings tab of the Report Settings dialog. It’s garbled.

    You could set the “PaperKind” property of Printer to “Letter”. Please refer the following line of code

    sectionReport.Document.Printer.PaperKind = Printing.PaperKind.Letter
    
    1. I want to run the report and print the report directly from my code, without user interaction. How can I do this?

    You can use the “Print” method of SectionDocument to print through code. Please refer the following line of code:

     sectionReport.Document.Print(False, False)
    

    Note: You need to import “GrapeCity.ActiveReports” namespace to use “Print” method.

    Hope it helps,

    Thanks.

  • Posted 12 April 2018, 7:26 am EST

    Thanks for your help.

    Since the following statement was in the form that contained the viewer, I didn’t need to add the “GrapeCity.ActiveReports” namespace…

    Viewer1.Document.Printer.PaperKind = Printing.PaperKind.Letter

Need extra support?

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

Learn More

Forum Channels