setHeader

setHeader(fr: Frame) updating;

The setHeader method of the Printer class sets the header frame to the frame specified in the fr parameter.

To clear the header, call the setHeader method, passing null as the frame. The header frame can be changed at any time but it takes effect only at the start of the next page of output.

The following example shows the use of the setHeader method.

checkForHeaderSwap(printForm : PrintForm);
begin
    if headerSwap.value then
        if app.printer.pageNumber.isEven then
            app.printer.setHeader(printForm.header2);
        else
            app.printer.setHeader(printForm.header);
        endif;
    endif;
    if footerSwap.value then
        if app.printer.pageNumber.isEven then
            app.printer.setFooter(printForm.footer2);
        else
            app.printer.setFooter(printForm.footer);
        endif;
    endif;
end;