IPrxSheetHeaderPart.Image

Syntax

Image: IGxImage;

Description

The Image property determines image for a part of the title or a header and footer.

Example

Executing the example requires that the repository contains a regular report with REPORT identifier. The file system should also contain the image file C:\Logo.png.

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

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Report: IPrxReport;
    Sheet: IPrxSheet;
    HeadersFooters: IPrxSheetHeaders;
    Header: IPrxSheetHeaderBase;
    HeaderPart: IPrxSheetHeaderPart;
    Img: IGxImage;
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]";
    Img := New GxImage.CreateFromFile("C:\Logo.png");
    HeaderPart.Image := Img;
    HeaderPart.ImageHeight := 10;
    HeaderPart.ImageWidth := 10;
    // Save changes
    MObj.Save;
End Sub UserProc;

After executing the example the central part of the header displays image from the file C:\Logo.png.

See also:

IPrxSheetHeaderPart