Hello,
I have notices that when printing from a win grid (using UltraGridPrintDocument) docked in a resizable form, that the form looks different based on the overall size of the form the grid is docked in. I believe this has to do with setting the 'FitWidthToPages' property, but I would like for no matter what the size of the form, the printed document looks the same.
Attached is a sample of what i am talking about. First, print the form by just clicking the print button. Then, maximize the form, and click the print button again. The two printed documents look different, and i would like for them to look the same. Is there any way around this to make both printed docs the same?
Any help is appreciated
-Chris
Georgi,
I just wanted to let you know we have not decided to go with this solution. We have have quite a few headaches with this printing project (with all the creation and draw filters), so we have decided to turn the printing into a SQL report. just wanted to let you know
I believe this should work. I will need to do some recalculation before print, but the idea is correct. Thanks for your help
Hello Chris,
Could you please take a look at the latest modifications in the sample. Please let me know if this approach is suitable in your scenario or if you have any questions.
Regards
I see what you were attempting to do, but I don't think this is going to work in my situation. I did notice when i printed on 8.5 X 11, it not all fit on the page. And ideally I would like them to be the same size as the smaller window when it prints.
Any other ideas? I have a feeling since this is the expected behavior, its going to be hard to overcome.
Thanks for your time.
The mentioned behavior is expected, because we print the same, what you are looking at the UltraGrid. In your scenario (with the properties UltraGrid.Dock = Fill and AutoFitStyle = ResizeAllColumns) is expected, when you resize your form, the UltraGird`s layout to be changed it and printed layout to be different.
Maybe one possible approach to achieve what you are looking for is to modify the property ultraGridPrintDocument1.DefaultPageSettings.PaperSize
Could you please take a look at the modifications that I made in your sample and please let me know if you have any questions.