IPPSpeedometer.LoadFromXml

Syntax

LoadFromXml(Xml: String);

Parameters

Xml. A string with XML markup.

Description

The LoadFromXml method loads XML markup of speedometer from string variable.

Comments

To save XML markup of speedometer to string variable, use the IPPSpeedometer.SaveToXml method.

Example

Executing the example requires that the repository contains a database with the ADHOC identifier. A dashboard must contain a speedometer.

Add links to the Adhoc, Express, Metabase, Speedometer system assemblies.

Sub UserProc;
Var
    Speedometer: IPPSpeedometer;
    MB: IMetabase;
    AdhocReport: IAdhocReport;
    EaxSpeedometer: IEaxSpeedometer;
    Enalyzer: IEaxAnalyzer;
    DsObjs: IAdhocDataSourceObjects;
    XML: String;
Begin
    MB := MetabaseClass.Active;
    // Get dashboard 
    AdhocReport := MB.ItemById("ADHOC").Edit As IAdhocReport;
    // Get dashboard data sources
    DsObjs := AdhocReport.DataSourceObjects;
    // Get speedometer
    Enalyzer := DsObjs.Item(0).GetSourceObject As IEaxAnalyzer;
    EaxSpeedometer := Enalyzer.Speedometer;
    // Get speedometer parameters
    Speedometer := EaxSpeedometer.Speedometer;
    // Save speedometer parameters in XML markup
    XML := Speedometer.SaveToXml;
    // Reload speedometer parameters
    Speedometer.LoadFromXml(XML);
    (Enalyzer As IMetabaseObject).Save;
End Sub UserProc;

After executing the example XML markup of speedometer is saved to string variable, then speedometer parameter settings are reloaded.

See also:

IPPSpeedometer