End_;
@End();
The End method resumes changing of repository object parameters.
This method is used after calling the IMetabaseObjectParams.BeginUpdate method that locks changing of repository object parameters.
Executing the example requires that the repository contains an express report with the EXPRESS identifier.
Add links to the Express, Metabase system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Analyzer: IEaxAnalyzer;
Object: IMetabaseObject;
Upd: IMetabaseObjectParamsUpdate;
Prms: IEaxDataAreaParams;
Name: String;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get express report
Analyzer := MB.ItemById("EXPRESS").Edit As IEaxAnalyzer;
Object := Analyzer As IMetabaseObject;
// Add a parameter to express report
Object.Params.Add;
// Deny changing of parameters
Upd := Object.Params.BeginUpdate;
// Get collection of express report parameters
Prms := Analyzer.DataArea.Params;
// Get parameter name and output it to console window
Name := Prms.Item(0).Name;
Debug.WriteLine("Parameter name before its change - " + Name);
// Change parameter name
Object.Params.Item(0).Name := "Param";
// Apply changes and output changed parameter name to console window
Upd.End_;
Debug.WriteLine("Parameter name after its change - " + Name);
End Sub UserProc;
After executing the example the console displays parameter names before and after its change.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Analyzer: IEaxAnalyzer;
Object: IMetabaseObject;
Upd: IMetabaseObjectParamsUpdate;
Prms: IEaxDataAreaParams;
Name: String;
Begin
// Get repository
MB := Params.Metabase;
// Get express report
Analyzer := MB.ItemById["EXPRESS"].Edit() As IEaxAnalyzer;
Object := Analyzer As IMetabaseObject;
// Add a parameter to express report
Object.Params.Add();
// deny changing of parameters
Upd := Object.Params.BeginUpdate();
// Get collection of express report parameters
Prms := Analyzer.DataArea.Params;
// Get parameter name and output it to console window
Name := Prms.Item[0].Name;
System.Diagnostics.Debug.WriteLine("Parameter name before change - " + Name);
// Change parameter name
Object.Params.Item[0].Name := "Param";
// Apply changes and output changed parameter name to console window
Upd.@End();
System.Diagnostics.Debug.WriteLine("Parameter name after change - " + Name);
End Sub;
See also: