IPrxVisualizerLegend.Update

Syntax

Update;

Description

The Update method refreshes visualizer legend.

Comments

This method exits visualizer edit mode without data saving.

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.

See also:

IPrxVisualizerLegend