EaxVisualizer: IEaxVisualizer;
The EaxVisualizer property determines a type of visualizer in a regular report.
Available types of visualizers are specified in the EaxObjectType enumeration.
Executing the example requires that the repository contains:
A regular report with the REG_REPORT_VISUALIZER identifier. The report is based on data source that is cube.
A map with the Map identifier.
Add links to the Drawing, Express, Metabase, Report, Tab, Topobase system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Report: IPrxReport;
ActiveSheet: IPrxSheet;
Table: IPrxTable;
Objects: ITabObjects;
AddObj: ITabObject;
Obj: IPrxVisualizer;
DA: IEaxDAtaArea;
Slice: IEaxDataAreaSlice;
SlObj: IEaxObject;
MapChart: IEaxMapChart;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get regular report
Report := MB.ItemById("REG_REPORT_VISUALIZER").Edit As IPrxReport;
// Create a new object "visualizer"
ActiveSheet := Report.ActiveSheet;
Table := ActiveSheet As IPrxTable;
Objects := Table.TabSheet.Objects;
AddObj := Objects.Add("PrxVisualizer", New GxRectF.Create(0, 0, 100, 100));
Obj := AddObj.Extension As IPrxVisualizer;
// Get analytical data area
DA := Report.DataArea;
// Get data slice
Slice := DA.Slices.Item(0);
// Add a map as visualizer
SlObj := Slice.Views.AddByType(EaxObjectType.MapChart) As IEaxVisualizer;
Obj.EaxVisualizer := SlObj As IEaxVisualizer;
MapChart := Obj.EaxVisualizer As IEaxMapChart;
MapChart.Enabled := True;
MapChart.Visible := True;
MapChart.Topobase := MB.ItemById("Map").Edit As ITopobase;
// Refresh map
MapChart.Refresh;
// Save changes
(Report As IMetabaseObject).Save;
End Sub UserProc;
After executing the example the specified regular report has a visualizer based on map.
See also: