IGxTitle.FormattedText

Syntax

FormattedText: String;

Description

The FormattedText property determines title text that is used to be displayed in the RTF format.

Comments

Information how to work with the RTF editor is presented in the Using Formatted Text article.

Example

Executing the example requires that the repository contains an express report with the EXPRESS_FORMATTEDTEXT identifier, which contains a table.

Add links to the Drawing, Express, Metabase system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Express: IEaxAnalyzer;
    Title: IGxTitle;
    HTML, HtmlTitle: String;
    Converter: ITextConverter;
Begin
    // Get repository
    MB := MetabaseClass.Active;
    // Get express report
    Express := MB.ItemById("EXPRESS_FORMATTEDTEXT").Edit As IEaxAnalyzer;
    // Get title bar
    Title := Express.TitleBar;
    // Determine title value format
    Title.CustomFormat := "# ##0,00";
    // Display title text in the HTML markup language
    HtmlTitle := Title.HtmlTitle;
    Debug.WriteLine("Report title text in the HTML markup language - " + HtmlTitle);
    // Make changes
    HTML := "<span style=""font-size: 8pt;color: #000000;text-align: left;font-family: Arial; "">" +
    "<span style=""color: #ff0000;font-size: 10pt;font-family: inherit;"">Important </span>" +
    "<span style=""color: #0000ff;font-style: italic;font-size: 8pt;font-family: inherit;"">text</span></span>" ;
    // Transformation into RTF from HTML
    Converter := New TextConverter.Create;
    Title.FormattedText := Converter.Export(HTML, TextFormat.Rtf);
    // Make report title visible
    Title.Visible := True;
    Title.IsControl := False;
    // Save changes
    (Express As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the console window displays report title text in the HTML markup language, a new title text in the RTF format is displayed in express report.

See also:

IGxTitle