Hamza Mohamed Saeed
Hamza Mohamed Saeed

Reputation: 17

DevExpress Xtrareport Direct Print without preview

I create a Receipt Report by Xtrareport it work properly, what I need is: vb.net code to print the report directly when pressing the Print Button without showing the preview report.

Upvotes: -1

Views: 1633

Answers (1)

Brendon
Brendon

Reputation: 1259

Use the ReportPrintTool class to create an instance of a report and immediately send it to a printer.

The Print a Report documentation offers sample code showing how to directly print a report using the ReportPrintTool.Print method. For instance:

    Dim report As New XtraReport1()
    Dim printTool As New ReportPrintTool(report))
    ' Invoke the Print dialog.
    printTool.PrintDialog()
    ' Send the report to the default printer.
    printTool.Print()

Upvotes: 2

Related Questions