using DevExpress.XtraReports.UI; XtraReport1 report = new XtraReport1(); ReportPrintTool printTool = new ReportPrintTool(report); printTool.Print();
using DevExpress.XtraPrinting; XtraReport1 report = new XtraReport1(); ReportPrintTool printTool = new ReportPrintTool(report); printTool.PrintingSystem.PageSettings.PrinterName = "MyPrinter"; printTool.PrintingSystem.PageSettings.PaperKind = PaperKind.Legal; printTool.Print();This code creates a new instance of XtraReport1 and creates a ReportPrintTool object using the report. It then sets the printer name and paper kind for the printing system and calls the Print() method to print the report. Package Library: DevExpress.XtraReports.UI is a namespace in the DevExpress Reporting library. The library provides a comprehensive set of tools for creating and customizing reports. It includes support for a wide range of data sources, visualizations, and export formats.