IGxTitle.Text

Syntax

Text: String;

Description

The Text property determines title text.

Comments

Any text information can be specified in the title text. The following substitutions can be used in text:

Substitution Description
&[Date] Current date.
&[Time] Current time.
&[Name] Express report name.
&[Globals.<Variable identifier>] Value of the  global variable.
&[Dimensions.<dimension identifier>] Selection by the specified dimension.

NOTE. Global variable identifier is case-sensitive.

Example

Executing the example requires that the repository contains an express report with the EXPRESS_REPORT identifier. The data source of express report must contain a dimension with the Country identifier.

Sub UserProc;
Var
    MB: IMetabase;
    Expr: IEaxAnalyzer;
    Title: IGxTitle;
Begin
    MB := MetabaseClass.Active;
    Expr := MB.ItemById("EXPRESS_REPORT").Edit As IEaxAnalyzer;
    Title := Expr.TitleBar;
    //Text
    Title.Text := "Report: &[Name]; Countries: &[Dimensions.COUNTRY]";
    //Background and font color
    Title.BackgroundColor := GxColor.FromName("Yellow");
    Title.TextColor := GxColor.FromName("Red");
    //Horizontal alignment of text
    Title.TextAlignment := GxStringAlignment.Center;
    //Vertical alignment of text
    Title.VerticalAlignment := GxVerticalAlignment.Center;
    //Wrap text
    Title.WrappedText := True;
    //Title height autofit
    Title.AutoHeight := True;
    //Maximum height
    Title.Height := 50;
    //Use of title as a control
    Title.IsControl := True;
    //Title visibility
    Title.Visible := True;
    (Expr As IMetabaseObject).Save;
End Sub UserProc;

On executing the example express report title is set up. Various formatting parameters and text are set for the title.

See also:

IGxTitle