FirstPageHeader: IPrxSheetHeader;
The FirstPageHeader property returns parameters of the first page header.
To get parameters of the first page footer, use the IPrxSheetHeaders.FirstPageFooter property.
Executing the example requires that the repository contains a regular report with the REPORT identifier.
Add links to the Metabase, Report system assemblies.
Sub UserProc;
Var
Metabase: IMetabase;
Report : IPrxReport;
Sheet: IPrxSheet;
Headers: IPrxSheetHeaders;
Param: IPrxSheetHeader;
Begin
Metabase := MetabaseClass.Active;
Report := Metabase.ItemById("REPORT").Edit As IPrxReport;
Sheet := Report.Sheets.Item(0);
Headers := Sheet.HeadersFooters;
// Set up header and footer margins for the first page
Param := Headers.FirstPageHeader;
Param.Margin := 30;
Param := Headers.FirstPageFooter;
Param.Margin := 30;
// Consider settings for the first page
Headers.DifferentFirstPageHeaderFooter := True;
Debug.Writeline("Margin of the first page header: " +
Headers.FirstPageHeader.Margin.ToString);
Debug.Writeline("Margin of first page footer: " +
Headers.FirstPageFooter.Margin.ToString);
(Report As IMetabaseObject).Save;
End Sub UserProc;
After executing the example margin parameters for first page headers and footers are determined. The console window displays information about header and footer margins.
See also: