IDataAreaOwner.OwnerInnerStyleSheet

Fore Syntax

OwnerInnerStyleSheet: IStyleSheet;

Fore.NET Syntax

OwnerInnerStyleSheet: Prognoz.Platform.Interop.Drawing.StyleSheetClass;

Description

The OwnerInnerStyleSheet property returns internal styles table of the object.

Comments

To work with the external styles table, use the IDataAreaOwner.OwnerStyleSheet property.

Fore Example

Executing the example requires that a repository contains dashboard with the DASHBOARD_STYLE identifier. This dashboard should contain only the Chart visualizer.

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

Sub UserProc;
Var
    mb: IMetabase;
    Report: IAdhocReport;
    DsoObj: IAdhocDataSourceObject;
    DaOwner: IDataAreaOwner;
    Style: IStyleSheet;
    StyleCont: IStyleContainer;
    StEntity: IStyledEntity;
Begin
    // Get current repository
    mb := MetabaseClass.Active;
    // Get dashboard
    Report := mb.ItemById("DASHBOARD_STYLE").Edit As IAdhocReport;
    // Get visualizer data source
    DsoObj := Report.DataSourceObjects.Item(0);
    // Get object to work with data area
    DaOwner := DsoObj.GetSourceObject As IDataAreaOwner;
    // Get internal styles table
    Style := DaOwner.OwnerInnerStyleSheet;
    // Add styles container to styles table
    StyleCont := Style.Add(0"");
    // Get visualizer formatting style
    StEntity := (DaOwner As IEaxAnalyzer).Chart.Chart As IStyledEntity;
    // Save visualizer formatting style to the styles container
    StEntity.SaveStyleToContainer(StyleCont);
    // Save changes
    (Report As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the chart formatting style is saved in the internal styles table of the dashboard.

Fore.NET Example

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

Imports Prognoz.Platform.Interop.AdHoc;
Imports Prognoz.Platform.Interop.Drawing;
Imports Prognoz.Platform.Interop.Express;

Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    Report: IAdhocReport;
    DsoObj: IAdhocDataSourceObject;
    DaOwner: IDataAreaOwner;
    Style: IStyleSheet;
    StyleCont: IStyleContainer;
    StEntity: IStyledEntity;
Begin
    // Get current repository
    mb := Params.Metabase;
    // Get dashboard
    Report := mb.ItemById["DASHBOARD_STYLE"].Edit() As IAdhocReport;
    // Get visualizer data source
    DsoObj := Report.DataSourceObjects.Item[0];
    // Get object to work with data area
    DaOwner := DsoObj.GetSourceObject() As IDataAreaOwner;
    // Get internal styles table
    Style := DaOwner.OwnerInnerStyleSheet;
    // Add styles container to styles table
    StyleCont := Style.Add(0"");
    // Get visualizer formatting style
    StEntity := (DaOwner As IEaxAnalyzer).Chart.Chart As IStyledEntity;
    // Save visualizer formatting style to the styles container
    StEntity.SaveStyleToContainer(StyleCont);
    // Save changes
    (Report As IMetabaseObject).Save();
End Sub;

See also:

IDataAreaOwner