IChartExternLegend.RowCount

Fore Syntax

RowCount: Integer;

Fore.NET Syntax

RowCount: System.Int32;

Description

The RowCount property determines the number of rows of the external chart legend.

Comments

To use the RowCount property, set the ItemPlacement property to ChartExtLegPlacement.CustomRows.

The specified number of rows is always used regardless of the legend size.The number of columns is automatically calculated depending on the number of elements of the external legend and its size.

Fore Example

Executing the example requires a regular report with a chart and an external legend on the report sheet. A unit is added to the report and the UserProc procedure is called from this unit using the hyperlink. The inspector of unit assemblies must contain links to the Chart, Report, Tab system assemblies.

Sub UserProc;
Var
    ChartExLegend: IChartExternLegend;
Begin
    ChartExLegend := (PrxReport.ActiveReport.ActiveSheet As IPrxTable).TabSheet.Objects.Item(1As IChartExternLegend;
    ChartExLegend.ItemPlacement := ChartExtLegPlacement.CustomRows;
    ChartExLegend.RowCount := 5;
End Sub UserProc;

After executing the example five rows are used to display elements in the external legend.

Fore.NET Example

Executing the example requires a regular report with a chart and an external legend on the report sheet. The .NET assembly is added to the report to handle report events. The OnBeforeOpenReport event is described in the unit of the specified assembly in the EventsClass class. Add links to the Chart and Tab system assemblies.

Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Chart;
Imports Prognoz.Platform.Interop.Tab;
...

Public Override Sub OnBeforeOpenReport(Report:IPrxReport; Var Cancel:Boolean);
Var
    ChartExLegend: IChartExternLegend;
Begin
    Cancel := False;
    ChartExLegend:=(Report.ActiveSheet As IPrxTable).TabSheet.Objects.Item[1As IChartExternLegend;
    ChartExLegend.ItemPlacement := ChartExtLegPlacement.celpCustomRows;
    ChartExLegend.RowCount := 5;
End Sub OnBeforeOpenReport;

Opening the report sets five rows to display elements in the external legend.

See also:

IChartExternLegend