I am using a composite chart which I show in the UltraPrintViewDialog. In the Print sample from the SamplesExplorer the chart is automatically nicely scaled to use the entire page.
The left preview is my application, the two red arrows indicate the wrong space.The right preview is from the print sample.
When I try to achieve the same from my application, the chart is not scaled. The size in the print preview changes when I change the size of the form. In the sample explorer the size of the chart in the preview does not change when the form size changes.
I compiled the sample on my PC. I use pretty much the same code as in the sample:
private void InitializeComponent(){ this.preview = new Infragistics.Win.Printing.UltraPrintPreviewDialog(this.components); this.preview.Name = "preview"; this.preview.PreviewSettings.ZoomMode = Infragistics.Win.Printing.ZoomMode.WholePage; this.preview.ThumbnailAreaVisible = false;}
public void PrintPreview(){ preview.Document = chart.PrintDocument; preview.ShowDialog();}
Any ideas what could cause the behaviour would be greatly appreciated.
Hi Georgi,
thank you for your reply.I am not using any PrinterSettings or PageSettings, that is supposed to be my next task ;-)I am using NetAdvantage 11.2 with Service Release 11.2.20112.2028.I get the same result on 2 different PCs with different Printers.
What other settings could prevent the chart from scaling?When I Print using the PrintChart() method, I get exactly the same result on paper like in the preview.
I would love to send you my code for the chart, but I don't know how you would get any data into it without the entire project. I can past all code accessing the chart and print preview here, would that help? That would be 278 lines plus the content of foreach-loops.
Cheers,Dennis
Hello DenSys,
Looking at the provided code everything looks correct. If you are using the default settings of your UltraChart, you willl achieve desired behavior.
Maybe you are using some of the properties in ultraChart1.PrintDocument.PrinterSettings or properties from your this.ultraPrintPreviewDialog1.PreviewSettings. If you are using any of these properties you could change the default chart`s behavior (like it is in your left screenshot).
If you are able to send me your sample, I`ll be glad to research this issue Also please inform me what is you current version and do you have any installed service release and which one.
Let me know if you have any questions.
Regards