XtraReport.SaveComponents Event
Occurs when a report is saved to an REPX file and allows you to manually decide which components should be stored into a report definition file, and which aren’t.
Namespace: DevExpress.XtraReports.UI
Assembly: DevExpress.XtraReports.v24.1.dll
NuGet Package: DevExpress.Reporting.Core
#Declaration
public event EventHandler<SaveComponentsEventArgs> SaveComponents
#Event Data
The SaveComponents event's data class is SaveComponentsEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Components | Provides access to the list of components that will be saved along with a report’s layout into a REPX file. |
#Remarks
Handle the SaveComponents event to customize the list of components to be saved along with a report to an REPX report definition file. To do this, use the SaveComponentsEventArgs.Components property. Adding a particular component to this list will force its serialization to an REPX file, while to prevent a particular component from being saved, you simply need to remove it from the Components list.
The SaveComponents event fires only when a report is saved to a report definition file (REPX) using the CodeDOM serialization (e.g., on calling the XtraReport.SaveLayout method). This is why, this event is not raised on saving a report in the End-User Report Designer where XML serialization is used by default.