Ticket T276308
Visible to All Users

Report fit to one page height and width

created 10 years ago

I am producing a report with the code below that works fine., it displays the report which is zoomed to a whole page.

Dim printTool AsNewReportPrintTool(report)
Dim ps AsPrintingSystemBase = printTool.PrintingSystem
printTool.ShowRibbonPreview()
ps.ExecCommand(PrintingSystemCommand.ZoomToWholePage)

What I want to be able to do is scale the report to fit to one page. Both width and height. I know the font may become very small, and the width my reduce but I need to get the report to print in one page only.

Is this possible.

Answers approved by DevExpress Support

created 10 years ago

Hi Jonny,

It is impossible to automatically adjust the scale factor to fit the entire report onto one page. However, you can manually define the XtraReport.PrintingSystem.Document.ScaleFactor property value to scale the content. To get the original content height in your Report, utilize the approach described here:
Get actual height of the report

Should you have further questions, please let me know.

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.