IPrxDataSource.UpdateNameOnOpen

Fore Syntax

UpdateNameOnOpen: Boolean;

Fore.NET Syntax

UpdateNameOnOpen: boolean;

Description

The UpdateNameOnOpen property determines update of the name and identifier of regular report data sources.

Fore Example

Executing the example requires a regular report with the REGULAR_REPORT identifier that contains data sources. Add links to the Metabase, Report system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Report: IPrxReport;
    DtSources: IPrxDataSources;
    DtSource: IPrxDataSource;
Begin
    MB := MetabaseClass.Active;
    Report := MB.ItemById("REGULAR_REPORT").Edit As IPrxReport;
    DtSources := Report.DataSources;
    For Each DtSource In DtSources Do
        DtSource.UpdateNameOnOpen := True;
    End For;
    (Report 
As IMetabaseObject).Save;

End Sub UserProc;

After executing the example on opening the regular report change the name of one data source. After opening the regular report, name and identifier of all data sources will be updated.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Report;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Report: IPrxReport;
    DtSources: IPrxDataSources;
    DtSource: IPrxDataSource;
Begin
    MB := Params.Metabase;
    Report := MB.ItemById["REGULAR_REPORT"].Edit() As IPrxReport;
    DtSources := Report.DataSources;
    For Each DtSource In DtSources Do
        DtSource.UpdateNameOnOpen := True;
    End For;
    (Report 
As IMetabaseObject).Save();

End Sub;

See also:

IPrxDataSource