Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

XtraReport.ExportToImage(String, DXImageFormat) Method

Exports a report to the specified file in the specified image format.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v24.2.dll

NuGet Package: DevExpress.Reporting.Core

#Declaration

public void ExportToImage(
    string path,
    DXImageFormat format
)

#Parameters

Name Type Description
path String

The path to the exported image file.

format DXImageFormat

The image format.

#Remarks

Note

Once the document export has started, it runs to completion and you cannot interrupt or cancel it.

This method exports a report to an image in the specified image format.

The current report export options are in effect. To get access to the current report export options, use the report’s XtraReport.ExportOptions property. The property contains the ExportOptions object whose ExportOptions.Image property provides access to the ImageExportOptions object that contains the Image export options.

Important

This method overwrites files with the same name without confirmation.

Use the ExportToImageAsync(String, ImageExportOptions, CancellationToken) method instead of ExportToImage to export a report asynchronously in a separate task.

See Also