using DevExpress.XtraReports.UI; // Define and load a report XtraReport report = new XtraReport(); report.LoadLayout("Report.repx"); // Create a ReportPrintTool instance ReportPrintTool printTool = new ReportPrintTool(report); // Show the Ribbon preview dialog printTool.ShowRibbonPreviewDialog();
using DevExpress.XtraReports.UI; // Define and load a report XtraReport report = new XtraReport(); report.LoadLayout("Report.repx"); // Create a ReportPrintTool instance ReportPrintTool printTool = new ReportPrintTool(report); // Customize the Ribbon preview dialog printTool.RibbonPreviewDialog.MdiParent = this; printTool.RibbonPreviewDialog.WindowState = FormWindowState.Maximized; // Show the Ribbon preview dialog printTool.ShowRibbonPreviewDialog();In this example, we create an instance of the ReportPrintTool class, then customize the Ribbon preview dialog by setting the MdiParent and WindowState properties. Finally, we call the ShowRibbonPreviewDialog method to display the report in the preview dialog with the customized Ribbon control. The ReportPrintTool class is part of the DevExpress.XtraPrinting package library, which provides advanced printing and export capabilities for DevExpress controls and reports.