User (Old forums)MemberJuly 20, 2006 at 9:38 amPost count: 23064
I am creating a report by code – that works fine –
but I want that the window (of the reportpreview) is maximized.
here my code:
Dim report As Report = New Report(Me.GridControl1)
Dim printerSettings As New PrinterSettings
printerSettings.DefaultPageSettings.Landscape = True
Imported from legacy forums. Posted by VUser (had 3634 views)User (Old forums)MemberJuly 25, 2006 at 12:58 pmPost count: 23064User (Old forums)MemberAugust 22, 2006 at 6:17 amPost count: 23064
Sorry for anwering so late – I was in holidays… –
you can see, what I mean in the XCEED-sample VB.Net Reporting, form Gridreporting.vb:
if you click on the Button ‘Generate Code Report’,
a new window opens the report, but too small;
I want that the report opens maximized.
Imported from legacy forums. Posted by VUser (had 564 views)User (Old forums)MemberAugust 22, 2006 at 2:42 pmPost count: 23064
There is no way to set the PrintDialog size using the PrintPreview method. However, PrintPreview is only a shortcut. You could do the whole process yourself. Here’s an example in C#. It assumes that you have a PrinterSettings instance.
using( PrintDocument document = this.CreatePrintDocument() )
// Bypass the built-in progression dialog
document.PrintController = new StandardPrintController();
document.PrinterSettings = ( PrinterSettings )printerSettings.Clone();
document.DefaultPageSettings = ( PageSettings )printerSettings.DefaultPageSettings.Clone();
using( System.Windows.Forms.PrintPreviewDialog printPrvDlg = new System.Windows.Forms.PrintPreviewDialog() )
printPrvDlg.Document = document;
printPrvDlg.WindowState = System.Windows.Forms.FormWindowState.Maximized;
Imported from legacy forums. Posted by André (had 230 views)
- You must be logged in to reply to this topic.