EaxVisualizer: IEaxVisualizer;
EaxVisualizer: Prognoz.Platform.Interop.Express.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.
The requirements and result of the Fore example execution match with those in the Fore.NET example.
Imports Prognoz.Platform.Interop.Drawing;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Tab;
Imports Prognoz.Platform.Interop.Topobase;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Report: IPrxReport;
ActiveSheet: IPrxSheet;
Table: IPrxTable;
Objects: ITabObjects;
AddObj: ITabObject;
Rect: GxRectF = New GxRectFClass();
Obj: IPrxVisualizer;
DA: IEaxDAtaArea;
Slice: IEaxDataAreaSlice;
SlObj: IEaxObject;
MapChart: IEaxMapChart;
Begin
// Get repository
MB := Params.Metabase;
// 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;
Rect.Create(0, 0, 100, 100);
AddObj := Objects.Add("PrxVisualizer", Rect);
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.eotMapChart) 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 Topobase;
// Refresh map
MapChart.Refresh();
// Save changes
(Report As IMetabaseObject).Save();
End Sub;
See also: