IPrxSheetHeaderPart.ImageAsBackground

Syntax

ImageAsBackground: Boolean;

Description

The ImageAsBackground property determines whether the image is used as a background in the title or header and footer.

Comments

Available values:

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;
    HeaderPart.ImageAsBackground := True;
    // 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. This image is used as a background.

See also:

IPrxSheetHeaderPart