ImageHeight: Double;
The ImageHeight property determines image height for a part of title or header and footer.
To execute the example the repository must contain a regular report with the REPORT_PRX identifier. The file system must include a file named C:\Logo.gif.
Sub Main;
Var
MB: IMetabase;
MObj: IMetabaseObject;
Report: IPrxReport;
Header: IPrxSheetHeaderBase;
HeaderPart: IPrxSheetHeaderPart;
Img: IGxImage;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("REPORT_PRX").Edit;
Report := MObj As IPrxReport;
Header := Report.ActiveSheet.Header;
HeaderPart := Header.Center;
HeaderPart.Text := "&[Picture]";
Img := New GxImage.CreateFromFile("C:\Logo.gif");
HeaderPart.Image := Img;
HeaderPart.ImageHeight := 10;
HeaderPart.ImageWidth := 10;
MObj.Save;
End Sub Main;
After executing the example the central part of the header displays image from the file C:\Logo.gif. Image height and width equal to 10 millimeters.
See also: