Text: String;
Text: String;
The Text property determines title text.
Any text information can be specified in the title text. Substitutions can also be used in the text. Depending on the object, for which the title is set up, the text allows for the following substitutions:
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_1").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 autofitting
Title.AutoHeight := True;
//Maximum height
Title.Height := 50;
//Use of the 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.
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. The selected procedure is an entry point for the .NET assembly.
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Drawing;
Imports Prognoz.Platform.Interop.Express;
...
Public Shared Sub UserProc(Params: StartParams);
Var
MB: IMetabase;
Expr: IEaxAnalyzer;
Title: IGxTitle;
GxColorCls: GxColorClassClass = New GxColorClassClass();
Begin
MB := Params.Metabase;
Expr := MB.ItemById["Express_1"].Edit() As IEaxAnalyzer;
Title := Expr.TitleBar;
//Text
Title.XamlText := "";
Title.Text := "Report: &[Name]; Countries: &[Dimensions.COUNTRY]";
//Background and font color
Title.BackgroundColor := GxColorCls.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 autofitting
Title.AutoHeight := True;
//Maximum height
Title.Height := 50;
//Use of the title as a control
Title.IsControl := True;
//Title visibility
Title.Visible := True;
(Expr As IMetabaseObject).Save();
End Sub;
On executing the example express report title is set up. Various formatting parameters and text are set for the title.
See also: