ReportDataProvider.MassUpdateDataType<T>(IObjectSpace, String, Type) Method

Updates references to a particular data type in all reports stored in the application database.

Namespace: DevExpress.ExpressApp.ReportsV2

Assembly: DevExpress.ExpressApp.ReportsV2.v18.1.dll

Syntax

public static void MassUpdateDataType<T>(
    IObjectSpace objectSpace,
    string oldDataType,
    Type newDataType
)where T : IReportDataV2Writable

Parameters

Type Name Description
IObjectSpace objectSpace

An IObjectSpace object used to access report data.

String oldDataType

A string which is the old full name of a data type.

Type newDataType

A Type which is the new data type.

Type Parameters

Name Description
T

The MassUpdateDataType<T> method is useful when you rename a particular business class and wish to update references to this class in your existing reports. As this method is static, you can call it from any appropriate context where the IObjectSpace instance is available. For example, you can call this method from the overridden ModuleUpdater.UpdateDatabaseAfterUpdateSchema method in the Updater.cs (Updater.vb) file. The generic T parameter specifies the report data type (business class type implementing IReportDataV2), used in your application.

using DevExpress.ExpressApp.ReportsV2;
//...
ReportDataProvider.MassUpdateDataType<ReportDataV2>(
    ObjectSpace, "MySolution.Module.Department", typeof(Division));