UpdateNameOnOpen: Boolean;
UpdateNameOnOpen: boolean;
The UpdateNameOnOpen property determines update of the name and identifier of regular report data sources.
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.
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: