CurrentTab: Boolean;
The CurrentTab property determines whether an object opens in the current browser tab.
Available values:
True. Default value. An object opens in the current browser tab.
False. An object opens in a new browser tab.
Executing the example requires that the repository contains a web form with a button. The repository should also contain a regular report with the REPORT identifier. The report contains two parameters with the P_START and P_FINISH identifiers.
Add links to the Metabase and WebForms system assemblies.
Sub Button1OnClick;
Var
Mb: IMetabase;
MDesc: IMetabaseObjectDescriptor;
Values: IMetabaseObjectParamValues;
Context: IWebOpenContext;
Begin
Mb := MetabaseClass.Active;
MDesc := Mb.ItemById("REPORT");
// Set up object opening context
Context := New WebOpenContext.Create;
Context.CurrentTab := False;
Context.Edit := False;
Values := MDesc.Params.CreateEmptyValues;
Values.FindById("P_START").Value := 2010;
Values.FindById("P_FINISH").Value := 2020;
Context.ParamValues := Values;
// Open object
Self.ShowObject(MDesc, Context);
End Sub Button1OnClick;
Clicking the button opens the specified report for view in a new browser tab. The report opens with the specified parameter values.
See also: