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
20
How to scale/shrink report content to fit a page?
posted

When I print WPF controls using the Report Object, sometimes the control does not fit on the page. 

For example, the XPS file will trim off the control if it is wider than the page. 

Is there a way to specify that the report content should scale/shrink to fit within one page?  If not, how are people dealing with dynamically sized WPF contorls and printing using this Report object?

Parents
No Data
Reply
  • 415
    posted

    Hi,

    The Report object exposes a ReportSettings object which controls various report-related settings. In order to scale/shrink your content to fit horizontally on a page, set the ReportSetting object's HorizontalPaginationMode property to HorizontalPaginationMode.Scale.

    For example, if you Report object is named report1, you can use the following code:

    report1.ReportSettings.HorizontalPaginationMode = HorizontalPaginationMode.Scale;

    The following Help topic also explains the ReportSettings object:

    http://help.infragistics.com/Help/NetAdvantage/WPF/2008.2/CLR3.X/html/WPF_Reporting_Modify_the_Page_Layout_of_a_Report.html

Children
No Data