The OnDataFieldsRetrieved Event occurs after Data Fields are retrieved for a specific Data Object. This event is commonly used to change the order Data Fields are displayed in the Data Menu of the Report Designer.
For custom code the args array is structured as follows:
args contains three objects:
- a System.Data.DataTable containing the names and metadata of the Data Fields
- the Data Object as a WebReports.Api.Reports.Entity object
- a reference to a WebReports.Api.Data.DataObjectBase object which calls the event.
For .NET Assemblies the method signature is as follows:
DataTable EventHandlerName(SessionInfo sessionInfo, DataTable originalDataFields, Entity dataObject, DataObjectBase eventCaller)
The DataTable being being passed to the event in the first argument has already applied Column Metadata.
Expects a System.Data.DataTable return value, which represents the modified data.