in
Forums
Blogs
Files
Devexpress.Com
Client Center
Support Center
DevExpress Channel

Help with setting page settings

Last post 10/23/2007 9:48 AM by Julie O'Brien. 2 replies.
Page 1 of 1 (3 items)
Sort Posts:
Previous Next
  • 10/12/2007 1:44 PM

    Help with setting page settings

    Hi.

    I'm using version 6.3 of the library.

    I am setting the margins and landscape orientation in the PrintingSystem object. I assign the PrintingSystem object to a PrintableComponentLink object. When the print preview dialog is displayed, I can see that the margins and landscape mode have not changed from the default values.

    PrintingSystem ps = new PrintingSystem();
    ps.PageSettings.Landscape = true; // default value is false.
    ps.PageSettings.TopMargin = 40; // default value is 100
    PrintableComponentLink link = new PrintableComponentLink(ps);
    link.Component = pivotgrid;
    link.ShowPreviewDialog(); // landscape is false and top margin is 100 ???

    After doing some more research, I see that the link object has Margins and Landscape mode properties as well and setting these properties allows the Print Preview dialog to respect the settings.

    I would assume that settitng the PageSettings options in the PrintingSystem and then assigning the ps object to the link object would set the link objects cooresponding settings (ps.landscape == link.landscape, etc...).

    Any light on the subject would be appreciated.

  • 10/19/2007 8:06 AM In reply to

    Re: Help with setting page settings

    Hello Julie,

    Try to use this code instead:

    PrintingSystem ps = new PrintingSystem();
    PrintableComponentLink link = new PrintableComponentLink(ps);
    link.Component = pivotGrid;
    link.CreateDocument();
    ps.PageSettings.Landscape = true; // default value is false.
    ps.PageSettings.TopMargin = 40; // default value is 100
    link.ShowPreviewDialog();

    Does this help you?

    @.
    R&D, .NET Team.

    PS. If you wish to receive direct assistance from our Support Team, use Support Center at http://www.devexpress.com/sc.
  • 10/23/2007 9:48 AM In reply to

    Re: Help with setting page settings

    Yes, this works as well. I see you call CreateDocument before assigning the page settings. That works too. I have been assigning the page settings to the Link object itself and that works as well.

    Thanks for the help.

Page 1 of 1 (3 items)
Copyright © 1998-2008 Developer Express Inc.
ALL RIGHTS RESERVED