Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
75
Changing Report.ReportSettings.PageSize does not reflect change when calling Report.Print(true, false)
posted

Hello,

I have the following code:

System.Drawing.Printing.PrinterSettings commonSettings = new System.Drawing.Printing.PrinterSettings();
var SomePaperSize = commonSettings.PaperSizes[0];
Report.ReportSettings.PageSize = new System.Windows.Size(SomePaperSize.Width, SomePaperSize.Height);

That resizes the page, I can see it works. However, if I call

Report.Print(true, false);

then in the print dialog I see another paper size selected. 

This does not happen, for example, when settings the page orientation:
Report.ReportSettings.PageOrientation = PageOrientation.Landscape;

In this case, if I call the print method I can see in the settings the chosen orientation.

Is there anyway to change the page size in the code before opening the print dialog?

Thank you! 

  • 34430
    Verified Answer
    Offline posted

    Hello Camilo,

    Thank you for your post.

    At the moment the Report.ReportSettings.PageSize property is related only to exporting of the report, not so much printing. The paper size is not affected by the page size property currently, and currently needs to be set in the print dialog. If you would like to see a way to set this from code, consider placing a new product idea for it at http://ideas.infragistics.com.

    There are many benefits to submitting a product idea:

    -          Direct communication with our product management team regarding your product idea.
    -          Notifications whenever new information regarding your idea becomes available.
    -          Ability to vote on your favorite product ideas to let us know which ones are the most important to you.  You will have ten votes for this and can change which ideas you are voting for at any time.
    -          Allow you to shape the future of our products by requesting new controls and products altogether.
    -          You and other developers can discuss existing product ideas with members of our Product Management team.

    Steps to create your idea:
                   
    1.       Log into the Infragistics Product Idea site at http://ideas.infragistics.com (creating a new login if needed).
    2.       Navigate to the product / platform channel of your choice (e.g. WPF, Windows Forms, ASP.NET, HTML5 / Ignite UI, iOS / NucliOS, etc.)
    3.       Add your product idea and be sure to be specific and provide as much detail as possible.

    The Product Idea site puts you in the driver’s seat and allows you to track the progress of your ideas at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.

    Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Associate Developer
    Infragistics Inc.
    www.infragistics.com/support