xtrareports-devexpress-dot-xtrareports-dot-extensions-dot-reportdesignextension-dot-registerextension-x28-devexpress-dot-xtrareports-dot-extensions-dot-reportdesignextension-system-dot-string-x29.md
Registers the custom report design extension to serialize custom parameter types.
Namespace : DevExpress.XtraReports.Extensions
Assembly : DevExpress.XtraReports.v25.2.Extensions.dll
NuGet Package : DevExpress.Win.Reporting
public static void RegisterExtension(
ReportDesignExtension extension,
string contextName
)
Public Shared Sub RegisterExtension(
extension As ReportDesignExtension,
contextName As String
)
| Name | Type | Description |
|---|---|---|
| extension | ReportDesignExtension |
A ReportDesignExtension object.
| | contextName | String |
A String value, identifying the context.
|
You can use the RegisterExtension property to serialize custom report parameters along with a report’s definition.
To provide parameters of custom types to your report, you should create a custom report design extension inherited from the ReportDesignExtension class.
Then, register the extension (using the RegisterExtension method) and associate the report with the custom extension (using the ReportDesignExtension.AssociateReportWithExtension method).
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 RegisterExtension(ReportDesignExtension, String) 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.
reporting-winforms-custom-xml-serialization/CS/WindowsApplication54/Form1.cs#L20
ReportExtension.RegisterExtensionGlobal(new ReportExtension());
ReportDesignExtension.RegisterExtension(new DesignExtension(), ExtensionName);
}
reporting-winforms-parameter-custom-type-serialization/CS/Form1.cs#L13
static Form1() {
ReportDesignExtension.RegisterExtension(new CustomReportExtension(), TeamParameterName);
CustomReportStorageExtension.RegisterExtensionGlobal(new CustomReportStorageExtension());
reporting-winforms-custom-xml-serialization/VB/WindowsApplication54/Form1.vb#L21
ReportExtension.RegisterExtensionGlobal(New ReportExtension())
ReportDesignExtension.RegisterExtension(New DesignExtension(), ExtensionName)
End Sub
reporting-winforms-parameter-custom-type-serialization/VB/Form1.vb#L15
Shared Sub New()
ReportDesignExtension.RegisterExtension(New CustomReportExtension(), TeamParameterName)
CustomReportStorageExtension.RegisterExtensionGlobal(New CustomReportStorageExtension())
See Also