A newer version of this page is available. Switch to the current version.

IPrintControl.PrintingSystem Property

Specifies the Printing System used to create and print a document for the link associated with the IPrintControl.

Namespace: DevExpress.XtraPrinting

Assembly: DevExpress.Printing.v18.2.Core.dll


PrintingSystemBase PrintingSystem { get; }
ReadOnly Property PrintingSystem As PrintingSystemBase

Property Value

Type Description

A PrintingSystemBase descendant.


This example illustrates how to override Printing System commands in code.

using System;
using System.Windows.Forms;
using System.Drawing.Imaging;
using DevExpress.XtraPrinting;
using DevExpress.XtraReports.UI;
// ...
private void button1_Click(object sender, EventArgs e) {

    // Create a report instance, assigned to a Print Tool.
    ReportPrintTool pt = new ReportPrintTool(new XtraReport1());

    // Generate the report's document. This step is required
    // to activate its PrintingSystem and access it later.

    // Override the ExportGraphic command.
    pt.PrintingSystem.AddCommandHandler(new ExportToImageCommandHandler());

    // Show the report's print preview.


public class ExportToImageCommandHandler : ICommandHandler {
    public virtual void HandleCommand(PrintingSystemCommand command,
    object[] args, IPrintControl printControl, ref bool handled) {
        if (!CanHandleCommand(command, printControl)) return;

        // Export the document to png.
        printControl.PrintingSystem.ExportToImage("C:\\Report.png", ImageFormat.Png);

        // Set handled to 'true' to prevent the standard exporting procedure from being called.
        handled = true;

    public virtual bool CanHandleCommand(PrintingSystemCommand command, IPrintControl printControl) {
        // This handler is used for the ExportGraphic command.
        return command == PrintingSystemCommand.ExportGraphic;
See Also