[ASPNET-Active Report 12] Cannot setting PaperKind

Posted by: h-nguyenduc on 14 October 2020, 6:22 pm EST

  • Posted 14 October 2020, 6:22 pm EST

    I have an issue for setting page of Active report v12. Below is my source code

    Dim rpt As New SectionReport1
    rpt.PageSettings.PaperKind = System.Drawing.Printing.PaperKind.A3
    rpt.PageSettings.Orientation = GrapeCity.ActiveReports.Document.Section.PageOrientation.Landscape

    However, When I click on the button Print on the Webviewer, the default of paper page is A4. I cannot change it.
  • Replied 14 October 2020, 6:35 pm EST

    Hello,

    Please try with the following lines of code:

    Dim rpt As New SectionReport1
    rpt.PageSettings.PaperKind = System.Drawing.Printing.PaperKind.A3
    rpt.PageSettings.Orientation = GrapeCity.ActiveReports.Document.Section.PageOrientation.Landscape
    rpt.Run();
    rpt.Document.Printer.PaperSize = new System.Drawing.Printing.PaperSize("A3", 1170, 1650);

    Hope it helps.

    Thanks,
    Mohit
  • Replied 14 October 2020, 7:00 pm EST

    mohitg said:
    Hello,

    Please try with the following lines of code:

    Dim rpt As New SectionReport1
    rpt.PageSettings.PaperKind = System.Drawing.Printing.PaperKind.A3
    rpt.PageSettings.Orientation = GrapeCity.ActiveReports.Document.Section.PageOrientation.Landscape
    rpt.Run();
    rpt.Document.Printer.PaperSize = new System.Drawing.Printing.PaperSize("A3", 1170, 1650);

    Hope it helps.

    Thanks,
    Mohit


    Thanks mohitg,
    I try it, but It not working.
    This is my source code:

    Dim rpt As New SectionReport1
    rpt.PageSettings.PaperKind = System.Drawing.Printing.PaperKind.A3
    rpt.PageSettings.Orientation = GrapeCity.ActiveReports.Document.Section.PageOrientation.Landscape
    rpt.Run()
    rpt.Document.Printer.PaperSize = new System.Drawing.Printing.PaperSize("A3", 1170, 1650)


    I cannot change it
  • Replied 15 October 2020, 7:39 pm EST

    Hello,

    Please refer to the attached report and it is working fine at my end. Could you please either modify the attached report or provide your own stripped-down report so that we can try to reproduce the same behavior at our end and assist you further accordingly.​​

    Thanks,
    Mohit
    Test_PageWeb.zip
  • Replied 18 October 2020, 2:57 pm EST

    Thanks for support!!!

    We tried to follow the sample you sent but it doesn't seem to solve the problem we were having.
    I have the customer to try our run by problem but still with no success. We have attached solution after editing. Please see if there is any problem.
    We are in need of settings so that when printing it can always receive the value of A3, not always the current A4
  • Replied 18 October 2020, 3:12 pm EST

    Hello,

    >>We have attached solution after editing
    Could you please attach it again. Make sure that attachment must be lesser than 5 MB.

    Thanks
  • Replied 18 October 2020, 7:41 pm EST

    Dear mohitg
    I have an Issue related to not being able to set up the Printer setting (paper size, paper orientation).
    1. Premise: I am migrating the project from Active report v3 to Active report v12
    + The old processor is setting the Printer setting to the OLD.rpx file as shown below and when PRINT displays the Print dialog, it will also be selected as A3. But on the program running ActiveReport v12, the Print dialog is always selected as A4
    <PageSettings PaperSize = "8" PaperWidth = "11906" PaperHeight = "16838" PaperName = "" />
    PaperSize = "8": A3
    3. I found the topic below and checked it out
    - https://dev.grapecity.co.jp/support/kb/detail.asp?id=41538
    - https://dev.grapecity.co.jp/support/kb/detail.asp?id=41572
    - https://www.grapecity.com/forums/activereports/aspnet-active-report-12-ca
    As a result, if the program runs ActiveReport v12, the Print dialog is always selected as A4

    Test_PageWeb_Sample.zip
  • Replied 21 October 2020, 1:34 am EST

    Hello,

    It is not possible to change the default setting of the Printer in IE without changing the registry of the computer.

    Sorry for inconvenience caused to you.

    Thanks,
    Mohit
  • Replied 21 October 2020, 6:05 pm EST

    Hi Mohitg,

    We tried the steps below to change the registry value but still didn't solve the above problem.
    Please advise if our settings are not correct

    "Open the Registry Editor (right click on Windows Start → Run → regedit)

    Access to this key:

    HKEY_CURRENT_USER \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ Windows

    For the name "LegacyDefaultPrinterMode", set "Value data:" to "1" to return to the previous behavior of the default printer in Windows 10.
    "

    Thanks,
    h-nguyenduc
  • Replied 23 October 2020, 1:14 am EST

    Hello,

    If you want to directly change the printing preferences on the system, You can open the Devices and Printer in control panel (Control Panel\Hardware and Sound\Devices and Printers) and change the printing preferences. Please refer to that attached image,

    Thanks,
    Mohit
Need extra support?

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

Learn More

Forum Channels