IAdhocReport.StyleSheet

Syntax

StyleSheet: IStyleSheet;

Description

The StyleSheet property determines an external styles table.

Comments

To work with the internal styles table, use the IAdhocReport.InnerStyleSheet property.

Example

Executing the example requires that the repository contains a dashboard with the DASHBOARD identifier containing a styles table with the GLOBAL_STYLE identifier.

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

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    AdhocReport: IAdhocReport;
    StyleSheet: IStyleSheet;
Begin
    // Get the current repository
    MB := MetabaseClass.Active;
    // Get dashboard
    MObj := MB.ItemById("DASHBOARD").Edit;
    AdhocReport := MObj As IAdhocReport;
    // Apply styles table
    StyleSheet := MB.ItemById("GLOBAL_STYLE").Bind As IStyleSheet;
    AdhocReport.StyleSheet := StyleSheet;
    // Save report
    MObj.Save;
End Sub UserProc;

After executing the example, an external styles table is selected as as formatting styles set for the dashboard.

See also:

IAdhocReport