Back to Devexpress

XtraReport.Extensions Property

xtrareports-devexpress-dot-xtrareports-dot-ui-dot-xtrareport-15151424.md

latest5.9 KB
Original Source

XtraReport.Extensions Property

Provides access to the report’s extensions.

Namespace : DevExpress.XtraReports.UI

Assembly : DevExpress.XtraReports.v25.2.dll

NuGet Package : DevExpress.Reporting.Core

Declaration

csharp
[Browsable(false)]
public IDictionary<string, string> Extensions { get; }
vb
<Browsable(False)>
Public ReadOnly Property Extensions As IDictionary(Of String, String)

Property Value

TypeDescription
IDictionary<String, String>

A dictionary storing the report extensions.

|

Remarks

You can use the Extensions property to serialize custom objects (such as custom report parameters or custom data sources) along with a report’s definition.

Review the following examples for more information on how to serialize custom data sources to XML:

See the following tutorials to learn how to register custom parameter types in reporting applications created for different platforms:

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

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.

reporting-winforms-custom-report-storage/CS/XpoReportStorage.cs#L54

csharp
report.Extensions["StorageID"] = item.Oid.ToString();
item.Layout = GetBuffer(report);

reporting-asp-net-core-custom-parameter-editor/CS/CustomParameterEditorAspNetCoreExample/Controllers/HomeController.cs#L16

csharp
var report = new DevExpress.XtraReports.UI.XtraReport();
report.Extensions[SerializationService.Guid] = CustomDataSerializer.Name;
return View(report);

reporting-mvc-custom-parameter-editor/CS/CustomParameterEditorAspNetMvcExample/Controllers/HomeController.cs#L12

csharp
var report = new DevExpress.XtraReports.UI.XtraReport();
report.Extensions[SerializationService.Guid] = CustomDataSerializer.Name;
return View(report);

reporting-winforms-custom-report-storage/VB/XpoReportStorage.vb#L61

vb
report.Extensions("StorageID") = item.Oid.ToString()
item.Layout = GetBuffer(report)

reporting-mvc-custom-parameter-editor/VB/CustomParameterEditorAspNetMvcExample/Controllers/HomeController.vb#L11

vb
Dim report = New DevExpress.XtraReports.UI.XtraReport()
report.Extensions(SerializationService.Guid) = CustomDataSerializer.Name
Return View(report)

See Also

RegisterExtension(ReportDesignExtension, String)

Report Parameters of Custom Types

Store Report Layouts

XtraReport Class

XtraReport Members

DevExpress.XtraReports.UI Namespace