Executing the example requires that the repository contains an express report with the ExpReport identifier and a map with the New_Map_1 identifier.
Sub SetTopobase;
Var
MB: IMetabase;
Analyzer: IEaxAnalyzer;
DataArea: IEaxDataArea;
Slice: IEaxDataAreaSlice;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get express report
Analyzer := MB.ItemById("ExpReport").Edit As IEaxAnalyzer;
// Get data area
DataArea := Analyzer.DataArea;
// Get data slice
Slice := DataArea.Slices.Item(0);
// Determine topobase
Slice.Topobase := MB.ItemById("New_Map_1").Bind As ITopobase;
Analyzer.MapChart.Visible := True;
// Save changes
(Analyzer As IMetabaseObject).Save;
End Sub SetTopobase;
After executing the example the map is set for the express report. The map is shown on opening the report.
See also: