IPrxDataIsland.Revert

Syntax

Revert;

Description

The Revert method cancels changes made in the data area.

Comments

Changes can be cancelled only for the data area, which is started to be edited using the IPrxDataIsland.Edit method.

Example

Executing the example requires that repository contains a regular report including data area with the REPORT_IPRXDATAISLAND identifier.

Add links to the Metabase, Report system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    DI: IPrxDataIsland;
    Report: IPrxReport;
Begin
    // Get repository
    MB := MetabaseClass.Active;
    // Get regular report
    MObj := MB.ItemById("REPORT_IPRXDATAISLAND").Edit;
    Report := MObj As IPrxReport;
    DI := Report.DataIslands.Item(0).Edit;
    // Change name
    DI.Name := "DI";
    // Display a new name in the console window
    Debug.WriteLine(DI.Name);
    // Cancel name changes
    DI.Revert;
    // Display previous name to the console window and save
    Debug.WriteLine(DI.Name);
    DI.Save;
    // Save report
    MObj.Save;
End Sub UserProc;

After executing the example the console window displays a new name of data area and next the name after renaming cancelation.

See also:

IPrxDataIsland