IPrxSheetHeaderPart.ImageDocument

Syntax

ImageDocument: IDocumentBase;

Description

The ImageDocument property determines the Document repository object for a part of the title or header and footer.

Example

Executing the example requires that the repository contains a regular report with the REPORT identifier and a document containing an image with the DOC_OBJ identifier.

Add links to the Fore, Metabase, and Report system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Report: IPrxReport;
    Sheet: IPrxSheet;
    HeadersFooters: IPrxSheetHeaders;
    Header: IPrxSheetHeaderBase;
    HeaderPart: IPrxSheetHeaderPart;
    Doc: IDocumentBase;
Begin
    MB := MetabaseClass.Active;
    // Get regular report
    MObj := MB.ItemById("REPORT").Edit;
    Report := MObj As IPrxReport;
    // Get the first sheet
    Sheet := Report.Sheets.Item(0);
    // Get headers and footers
    HeadersFooters := Sheet.HeadersFooters;
    // Get header
    Header := HeadersFooters.Header;
    // Set up header for the first sheet
    HeaderPart := Header.Center;
    HeaderPart.Text := "&[Picture]";
    Doc := MB.ItemById("DOC_OBJ").Edit As IDocumentBase;
    HeaderPart.ImageDocument := Doc;
    HeaderPart.ImageHeight := 10;
    HeaderPart.ImageWidth := 10;
    // Save changes
    MObj.Save;
End Sub UserProc;

After executing the example the central part of the header displays the image from the specified document.

See also:

IPrxSheetHeaderPart