Skip to main content
.NET 6.0+

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.v24.1.dll

Declaration

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

Parameters

Name Type Description
objectSpace IObjectSpace

An IObjectSpace object used to access report data.

oldDataType String

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

newDataType Type

A Type which is the new data type.

Type Parameters

Name
T

Remarks

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));
See Also