corelibraries-devexpress-dot-xtraprinting-dot-printtoolbase-e5763ab3.md
Prints the current document on the default printer.
Namespace : DevExpress.XtraPrinting
Assembly : DevExpress.Printing.v25.2.Core.dll
NuGet Package : DevExpress.Printing.Core
public void Print()
Public Sub Print
This method immediately sends a report assigned to the PrintToolBase to the default printer.
The document to be printed is accessible via the PrintingSystemBase.Document property of the PrintToolBase.PrintingSystem. Note that you need to call the XtraReport.CreateDocument method to generate a document prior to calling the Print method.
To send a report to a different printer, use the overloaded Print(String) method with the printerName parameter.
To support server printing on Linux, install the libcups library. See Printing in Reporting Tools for Web for details.
The following code snippets (auto-collected from DevExpress Examples) contain references to the Print() method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
PrintToolBase tool = new PrintToolBase(report.PrintingSystem);
tool.Print();
}
pt.PrintingSystem.PrintProgress += new PrintProgressEventHandler(PrintingSystem_PrintProgress);
pt.Print();
}
reporting-winforms-print-reports-in-batch/CS/BatchPrinting/Form1.cs#L31
ReportPrintTool pts = new ReportPrintTool(report);
pts.Print();
}
AddHandler pt.PrintingSystem.PrintProgress, New PrintProgressEventHandler(AddressOf PrintingSystem_PrintProgress)
pt.Print()
End Sub
reporting-winforms-print-reports-in-batch/VB/BatchPrinting/Form1.vb#L36
Dim pts As New ReportPrintTool(report)
pts.Print()
Next report
See Also