ImageDocument: IDocumentBase;
The ImageDocument property determines the Document repository object for a part of the title or header and footer.
To execute the example the repository must contain a regular report with the REPORT_PRX identifier and a document containing an image with the DOC_OBJ identifier.
Sub Main;
Var
MB: IMetabase;
MObj: IMetabaseObject;
Report: IPrxReport;
Header: IPrxSheetHeaderBase;
HeaderPart: IPrxSheetHeaderPart;
Doc: IDocumentBase;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("REPORT_PRX").Edit;
Report := MObj As IPrxReport;
Header := Report.ActiveSheet.Header;
HeaderPart := Header.Center;
HeaderPart.Text := "&[Picture]";
Doc := MB.ItemById("DOC_OBJ").Edit As IDocumentBase;
HeaderPart.ImageDocument := Doc;
HeaderPart.ImageHeight := 10;
HeaderPart.ImageWidth := 10;
MObj.Save;
End Sub Main;
After executing the example central part of the header displays image from the DOC_OBJ document.
See also: