Skip to main content

ReportDesigner.NewDocument(Func<XtraReport>, Action<ReportDesignerDocument>) Method

Creates a new report based on the specified template and opens it in the End-User Report Designer.

Namespace: DevExpress.Xpf.Reports.UserDesigner

Assembly: DevExpress.Xpf.ReportDesigner.v24.2.dll

NuGet Package: DevExpress.Wpf.Reporting

Declaration

public ReportDesignerDocument NewDocument(
    Func<XtraReport> newReportFactory = null,
    Action<ReportDesignerDocument> beforeLoad = null
)

Optional Parameters

Name Type Default Description
newReportFactory Func<XtraReport> null

A function that returns a template report to create a new report.

beforeLoad Action<ReportDesignerDocument> null

An action that will be invoked before a new document is created.

Returns

Type Description
ReportDesignerDocument

A designer document that displays the created report.

Remarks

The NewDocument method creates a new report based on the specified template, creates a new instance of the ReportDesignerDocument class and loads the report to the created document.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the NewDocument(Func<XtraReport>, Action<ReportDesignerDocument>) method.

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.

See Also