IPrxTableIslandGroupingTotals.Caption

Fore Syntax

Caption : IExpression;

Fore.NET Syntax

Caption : Prognoz.Platform.Interop.ForeSystem.IExpression;

Description

The Caption property determines a totals title.

Comments

To determine formatting of totals, use the IPrxTableIslandGroupingTotals.Style property.

Fore Example

Executing the example requires that the repository contains a regular report with the Report identifier, which sheet contains a relational data area.

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

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Report: IPrxReport;
    TabIs: IPrxTableIslands;
    TI: IPrxTableIsland;
    Grs: IPrxTableIslandGroupings;
    Gr: IPrxTableIslandGrouping;
    GrT: IPrxTableIslandGroupingTotals;
    Style: IPrxCellStyle;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemById("Report").Edit;
    Report := MObj As IPrxReport;
    TabIs := Report.TableIslands;
    TI := TabIs.Item(0);
    TI := Ti.Edit;
    Grs := TI.Groupings;
    Gr := Grs.Item(0);
    GrT := Gr.Totals;
    GrT.Caption.AsString := "VALUE";
    GrT.Method(TI.Layout.Rows(0).Cells(0)).Method := BasicAggregatorOperation.Sum;
    Style := GrT.Style;
    Style.BackgroundColor := New GxColor.CreateRGB(00250);
    Style.Font.Bold := TriState.OnOption;
    TI.Save;
    MObj.Save;
End Sub UserProc;

After executing the example parameters of totals are set up.

Fore.NET Example

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

Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Matrix;
Imports Prognoz.Platform.Interop.Drawing;
Imports Prognoz.Platform.Interop.ForeSystem;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Report: IPrxReport;
    TabIs: IPrxTableIslands;
    TI: IPrxTableIsland;
    Grs: IPrxTableIslandGroupings;
    Gr: IPrxTableIslandGrouping;
    GrT: IPrxTableIslandGroupingTotals;
    Style: IPrxCellStyle;
    Color: GxColor;
Begin
    MB := Params.Metabase;
    MObj := MB.ItemById["Report"].Edit();
    Report := MObj As IPrxReport;
    TabIs := Report.TableIslands;
    TI := TabIs.Item[0];
    TI := Ti.Edit();
    Grs := TI.Groupings;
    Gr := Grs.Item[0];
    GrT := Gr.Totals;
    GrT.Caption.AsString := "VALUE";
    GrT.Method[TI.Layout.Rows[0].Cells[0]].Method := BasicAggregatorOperation.baoSum;
    Style := GrT.Style;
    Color := New GxColorClass_2();
    Style.BackgroundColor := Color;
    Color.CreateRGB(00250);
    Style.Font.Bold := TriState.tsOnOption;
    TI.Save();
    MObj.Save();
End Sub;

See also:

IPrxTableIslandGroupingTotals