IAdhocReport.PageSettings

Syntax

PageSettings: IAdhocPageSettings;

Description

The PageSettings property returns dashboard page settings.

Comments

The settings are applied only on printing a dashboard and do not influence on its view in the working area.

Example

Executing the example requires that the repository contains a dashboard with the ADHOC identifier. Add links to the Adhoc, Drawing, Metabase system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    mbObj: IMetabaseObject;
    Dashboard: IAdhocReport;
    PageSett: IAdhocPageSettings;
    Margins: IGxPageMargins;
Begin
    mb := MetabaseClass.Active;
    // Get dashboard
    mbObj := mb.ItemById("ADHOC").Edit;
    Dashboard := mbObj As IAdhocReport;
    // Get page settings
    PageSett := Dashboard.PageSettings;
    // Determine page settings
    PageSett.PaperFormat := GxPaperFormat.A4;
    PageSett.PaperOrientation := GxPaperOrientation.Landscape;
    Margins := PageSett.Margins;
    Margins.Top := 20;
    Margins.Bottom := 20;
    // Save changes to the dashboard
    mbObj.Save;
End Sub UserProc;

Example execution result: printing options of the page are changed for the ADHOC dashboard, changes are saved.

See also:

IAdhocReport