SystemButtonType: PrxToolbarSystemButtonType;
The SystemButtonType property returns system button type.
To execute the example the repository must contain a regular report with the REPORT identifier. The toolbar can be changed in a report.
Add links to the Metabase, Report system assemblies.
Sub UserProc;
Var
Mb: IMetabase;
Report: IPrxReport;
Toolbar: IPrxToolbar;
Begin
Mb := MetabaseClass.Active;
// Get regular report
Report := Mb.ItemById("REPORT").Bind As IPrxReport;
// Get toolbar
Toolbar := Report.Toolbar;
Debug.WriteLine("Changes on the toolbar: " + Toolbar.IsCustom.ToString);
// View information about elements
ShowElements(Toolbar.Elements);
End Sub UserProc;
Sub ShowElements(Elements: IPrxToolbarElements);
Var
Element: IPrxToolbarElement;
SystemButton: IPrxSystemButtonElement;
Begin
For Each Element In Elements Do
If Element.Type = PrxToolbarElementType.SystemButton Then
SystemButton := Element As IPrxSystemButtonElement;
Debug.WriteLine("System button type: " + SystemButton.SystemButtonType.ToString + ". Visibility: " + Element.Visible.ToString);
Elseif Element.Type = PrxToolbarElementType.UserGroup Then
ShowElements((Element As IPrxUserGroupElement).Elements);
End If;
End For;
End Sub ShowElements;
After executing the example the development environment console displays information about system buttons on the toolbar of the specified report.
See also: