IPrxSheetHeaders.Header

Syntax

Header: IPrxSheetHeader;

Header: Prognoz.Platform.Interop.Report.IPrxSheetHeader;

Description

The Header property returns header parameters.

Comments

To get footer parameters, use the IPrxSheetHeaders.Footer property.

Example

Executing the example requires that the repository contains a regular report with the REPORT identifier.

Add links to the Metabase, Report system assemblies.

Sub UserProc;
Var
    Metabase: IMetabase;
    Report : IPrxReport;
    Sheet: IPrxSheet;
    Headers: IPrxSheetHeaders;
    Param: IPrxSheetHeader;
Begin
    Metabase := MetabaseClass.Active;
    Report := Metabase.ItemById("REPORT").Edit As IPrxReport;
    Sheet := Report.Sheets.Item(0);
    Headers := Sheet.HeadersFooters;
    // Set up header and footer margins
    Param := Headers.Header;
    Param.Margin := 10;
    Param := Headers.Footer;
    Param.Margin := 10;
    Debug.Writeline("Header margin: " + 
        Headers.Header.Margin.ToString);
    Debug.Writeline("Footer margin: " + 
        Headers.Footer.Margin.ToString);
    (Report As IMetabaseObject).Save;
End Sub UserProc;

Public Shared Sub Main(Params: StartParams);
Var
    Metabase: IMetabase;
    Report : IPrxReport;
    Sheet: IPrxSheet;
    Headers: IPrxSheetHeaders;
    Param: IPrxSheetHeader;
Begin
    Metabase := Params.Metabase;
    Report := Metabase.ItemById["REPORT"].Edit() As IPrxReport;
    Sheet := Report.Sheets.Item[0];
    Headers := Sheet.HeadersFooters;
    // Set up header and footer margins
    Param := Headers.Header;
    Param.Margin := 10;
    Param := Headers.Footer;
    Param.Margin := 10;
    System.Diagnostics.Debug.Writeline("Header margin: " + 
        Headers.Header.Margin.ToString());
    System.Diagnostics.Debug.Writeline("Footer margin: " + 
        Headers.Footer.Margin.ToString());
    (Report As IMetabaseObject).Save();
End Sub;

After executing the example header and footer margin parameters are determined. The console window displays information about header and footer margins.

See also:

IPrxSheetHeaders