IPrxVisualizerLegend.Update

Fore Syntax

Update;

Fore.NET Syntax

Update();

Description

The Update method refreshes visualizer legend.

Comments

This method exits visualizer edit mode without data saving.

Fore Example

Executing the example requires a form containing the components:

It is required to have a regular report that contains a table. One of table dimensions has the Background Color metric type. The regular report is a data source for UiReport1.

Add links to the Drawing, Express, Tab, Visualizators system assemblies.

Sub UserProc;
Var
    Report: IPrxReport;
    TS: ITabSheet;
    Grid: IEaxGrid;
    Pos: IGxRectF;
    Visualizer: IPrxVisualizerLegend;
    i: Integer;
    VZLegend: IVZIntervalsLegend;
    VZLegendBase: IVZLegendBase;
Begin
    // Get regular report
    Report := UiReport1.Report;
    // Get active report sheet
    TS := (Report.ActiveSheet As IPrxTable) As ITabSheet;
    // Insert table legend to report
    Pos := New GxRectF.Create(0000);
    Pos.Left := TS.View.Selection.Range.Location.X;
    Pos.Top := TS.View.Selection.Range.Location.Y;
    Pos.Width := TS.View.Selection.Range.Width;
    Pos.Height := TS.View.Selection.Range.Height;
    TS.Objects.Add("PrxVisualizerLegend", Pos);
    Visualizer := TS.Objects.Item(TS.Objects.Count - 1).Extension As IPrxVisualizerLegend;
    Grid := Report.DataArea.Views.Item(0As IEaxGrid;
    i := Grid.Legends.Add(Grid.IndicatorLegendAssignment(EaxGridIndicatorType.BackgroundColor));
    Visualizer.SetEaxObjectLegend(Grid, EaxGridIndicatorType.BackgroundColor);
    // Get table legend with intervals
    VZLegend := Visualizer.PlacedControl As IVZIntervalsLegend;
    VZLegendBase := VZLegend As IVZLegendBase;
    // Copy header to footer
    VZLegendBase.Footer := VZLegendBase.Header;
    // Refresh visualizer
    Visualizer.Update;
End Sub UserProc;

After executing the example a table legend with header and footer is created in the user-defined table cell range.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example. Use Fore.NET analogs instead of Fore components.

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

Private Sub UserProc();
Var
    Report: IPrxReport;
    TS: ITabSheet;
    Grid: IEaxGrid;
    Pos: GxRectF = New GxRectFClass();
    Visualizer: IPrxVisualizerLegend;
    i: Integer;
    VZLegend: IVZIntervalsLegend;
    VZLegendBase: IVZLegendBase;
Begin
    // Get regular report
    Report := UiReportNet1.ReportUi.Report;
    // Get active report sheet
    TS := (Report.ActiveSheet As IPrxTable) As ITabSheet;
    // Insert table legend to report
    Pos.Create(0000);
    Pos.Left := TS.View.Selection.Range.Location.X;
    Pos.Top := TS.View.Selection.Range.Location.Y;
    Pos.Width := TS.View.Selection.Range.Width;
    Pos.Height := TS.View.Selection.Range.Height;
    TS.Objects.Add("PrxVisualizerLegend", Pos);
    Visualizer := TS.Objects.Item[TS.Objects.Count - 1].Extension As IPrxVisualizerLegend;
    Grid := Report.DataArea.Views.Item[0As IEaxGrid;
    i := Grid.Legends.Add(Grid.IndicatorLegendAssignment[EaxGridIndicatorType.egitBackgroundColor As Integer]);
    Visualizer.SetEaxObjectLegend(Grid, EaxGridIndicatorType.egitBackgroundColor As Integer);
    // Get table legend with intervals
    VZLegend := Visualizer.PlacedControl As IVZIntervalsLegend;
    VZLegendBase := VZLegend As IVZLegendBase;
    // Copy header to footer
    VZLegendBase.Footer := VZLegendBase.Header;
    // Refresh visualizer
    Visualizer.Update();
End Sub UserProc;

See also:

IPrxVisualizerLegend