IPrxChart.EaxChart

Fore Syntax

EaxChart: IEaxChart;

Fore.NET Syntax

EaxChart: Prognoz.Platform.Interop.Express.EaxChart;

Description

The EaxChart property determines a chart, which data source is analytical data area.

Comments

To determine chart source type, use the IPrxChart.SourceType property.

Fore Example

Executing the example requires a regular report with the REGULAR_REPORT identifier. Analytical data area is located on the report sheet.

Add links to the Express, Drawing, Metabase, Report, Tab system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Report: IPrxReport;
    Table: IPrxTable;
    TabObj: ITabObjects;
    Placement: IGxRectF;
    prx_chart: IPrxChart;
    DArea: IEaxDataArea;
    eax_da: IEaxDataAreaViews;
    obj_type: EaxObjectType;
    eax_obj: IEaxObject;
    eax_chart: IEaxChart;
Begin
    MB := MetabaseClass.Active;
    Report := MB.ItemById("REGULAR_REPORT").Edit As IPrxReport;
    Table := Report.ActiveSheet As IPrxTable;
    TabObj := Table.TabSheet.Objects;
    TabObj.Clear;
    Placement:= New GxRectF.Create(10,10,150,100);
    prx_chart := TabObj.Add("PrxChart",Placement).Extension As IPrxChart;
    prx_chart.SourceType := PrxChartSourceType.EaxChart;
    // Data source for chart:
    DArea := Report.DataArea;
    eax_da := DArea.Slices.Item(0).Views;
    obj_type := EaxObjectType.Chart;
    eax_obj := eax_da.AddByType(obj_type);
    eax_chart := eax_obj As IEaxChart;
    eax_chart.Visible := True;
    eax_chart.Enabled := True;
    prx_chart.EaxChart := eax_chart;
    (Report As IMetabaseObject).Save;
End Sub UserProc;

After executing the example a chart is added to regular report sheet, which data source is analytical data area.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Tab;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Drawing;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Report: IPrxReport;
    Table: IPrxTable;
    TabObj: ITabObjects;
    Placement: GxRectF = New GxRectFClass();
    prx_chart: IPrxChart;
    DArea: IEaxDataArea;
    eax_da: IEaxDataAreaViews;
    obj_type: EaxObjectType;
    eax_obj: IEaxObject;
    eax_chart: IEaxChart;
Begin
    MB := Params.Metabase;
    Report := MB.ItemById["REGULAR_REPORT"].Edit() As IPrxReport;
    Table := Report.ActiveSheet As IPrxTable;
    TabObj := Table.TabSheet.Objects;
    TabObj.Clear();
    Placement.Create(10,10,150,100);
    prx_chart := TabObj.Add("PrxChart",Placement).Extension As IPrxChart;
    prx_chart.SourceType := PrxChartSourceType.pcstEaxChart;
    // Data source for chart:
    DArea := Report.DataArea;
    eax_da := DArea.Slices.Item[0].Views;
    obj_type := EaxObjectType.eotChart;
    eax_obj := eax_da.AddByType(obj_type);
    eax_chart := eax_obj As IEaxChart;
    eax_chart.Visible := True;
    eax_chart.Enabled := True;
    prx_chart.EaxChart := eax_chart As EaxChart;
    (Report As IMetabaseObject).Save();
End Sub;

See also:

IPrxChart