I have a chart on one of the forms in my project. I have added a button to the form that allows the user to print the chart. However, the margins are too big, it is printing Portrait, and it is spanning two pages. I am currently simply using the Print method of the chart to print it.
How can I change things so that the chart prints:
1) in Landscape mode
2) to fill the whole page
3) with specific margin values?
Please provide code samples in VB.
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.
Hello Bob,
Thank you for contacting us. You should create a PrintableComponentLink instance and adjust its Landscape and Margins property values. Then print a ChartControl via this component. To control sizing mode adjust the ChartControl.OptionsPrint.SizeMode property value. Attached is a sample, demonstrating how this works.
Thanks,
Alessandro.
How can I use the PrintableComponentLink.Print method such that it prints to the default printer? It seems to require that I specify a printer name, but I can't possibly know what printer names of users will be.
Hello Bob,
Please use the PrintingSystem.Print Method for this purpose:
Attached is an updated sample.
Thanks,
Alessandro.