ReportViewer.WritePdfTo(HttpResponse, XtraReport) Method

Exports the report to the PDF, and writes the output to the specified HTTP response. An XtraReport object should be passed to this method as a parameter.

Namespace: DevExpress.XtraReports.Web

Assembly: DevExpress.XtraReports.v18.2.Web.WebForms.dll

Declaration

public static void WritePdfTo(
    HttpResponse response,
    XtraReport report
)
Public Shared Sub WritePdfTo(
    response As HttpResponse,
    report As XtraReport
)

Parameters

Type Name Description
HttpResponse response

A HttpResponse object specifying the HTTP response to which the file should be written.

XtraReport report

An XtraReport object to be represented as an PDF file.

The stream generated by this method contains the PDF representation of the report, and will be written to the specified HttpResponse object.

Note

Call the WritePdfTo method, after all modifications to a report document's pages have been accomplished, because, after the WritePdfTo method is called, the page's life cycle is over. And, in a subsequent attempt to customize it, a ThreadAbortException will be thrown.

See Also