Skip to main content
.NET Framework 4.6.2+

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.2.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