Skip to main content
A newer version of this page is available. .

ReportPrintTool Class

An instrument for publishing reports in WinForms applications.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraPrinting.v17.2.dll

Declaration

public class ReportPrintTool :
    PrintTool,
    IReportPrintTool,
    IDisposable

Remarks

Use the ReportPrintTool class, to show a report document in a Print Preview form, or immediately send a report to a printer.

In addition to the properties inherited from its base, the PrintTool class, the ReportPrintTool class exposes the ReportPrintTool.Report property that allows you to access the options of a report assigned to the Report Print Tool.

Note

This class is supposed to be used only in WinForms applications. To publish reports in an ASP.NET application, use the Document Viewer control.

Example

This example illustrates how to define a document scale factor in a print preview.

using System;
using System.Windows.Forms;
using DevExpress.XtraPrinting;
using DevExpress.XtraReports.UI;
using DevExpress.XtraPrinting.Preview;
// ...

private void button1_Click(object sender, EventArgs e) {
    ReportPrintTool printTool = new ReportPrintTool(new XtraReport1());
    printTool.Report.CreateDocument(false);
    printTool.PreviewForm.Load += new EventHandler(PreviewForm_Load);
    printTool.ShowPreviewDialog();
}

void PreviewForm_Load(object sender, EventArgs e) {
    PrintPreviewFormEx frm = (PrintPreviewFormEx)sender;
    frm.PrintingSystem.ExecCommand(PrintingSystemCommand.Scale, new object[] { 0.7f });
}

The following code snippets (auto-collected from DevExpress Examples) contain references to the ReportPrintTool class.

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.

Inheritance

See Also