EvenPageHeader: IPrxSheetHeader;
EvenPageHeader: Prognoz.Platform.Interop.Report.IPrxSheetHeader;
The EvenPageHeader property returns parameters of even page header.
To get parameters of even page footer, use the IPrxSheetHeaders.EvenPageFooter 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 margin for even page headers and footers
Param := Headers.EvenPageHeader;
Param.Margin := 15;
Param := Headers.EvenPageFooter;
Param.Margin := 15;
// Consider settings for even pages
Headers.OddAndEvenPagesHeaderFooter := True;
Debug.Writeline("Margin of even page header: " +
Headers.EvenPageHeader.Margin.ToString);
Debug.Writeline("Margin of even page footer: " +
Headers.EvenPageFooter.Margin.ToString);
(Report As IMetabaseObject).Save;
End Sub UserProc;
Public Shared Sub Main(Params: StartParams);
Var
Metabase: IMetabase;
Report : IPrxReport;
Sheet: IPrxSheet;
Headers: IPrxSheetHeaders;
Param: IPrxSheetHeader;
Begin
Metabase := Params.Metabase;
Report := Metabase.ItemById["REPORT"].Edit() As IPrxReport;
Sheet := Report.Sheets.Item[0];
Headers := Sheet.HeadersFooters;
// Set up margin for even page headers and footers
Param := Headers.EvenPageHeader;
Param.Margin := 15;
Param := Headers.EvenPageFooter;
Param.Margin := 15;
// Consider settings for even pages
Headers.OddAndEvenPagesHeaderFooter := True;
System.Diagnostics.Debug.Writeline("Margin of even page header: " +
Headers.EvenPageHeader.Margin.ToString());
System.Diagnostics.Debug.Writeline("Margin of even page footer: " +
Headers.EvenPageFooter.Margin.ToString());
(Report As IMetabaseObject).Save();
End Sub;
After executing the example margin parameters for even page headers and footers are determined. The console window displays information about header and footer margins.
See also: