Hey all!
I have problems with showing a special pagefooter on the last page - sometimes it appears, and sometimes it is the standard for all pages depending how much text I have formatted in the bodysection. The body section is filled up with only one large table. It seems that it depends on that.
I have tried to reformat all and refresh all but nothing helps :-(
How can I ensure that the pagefooter on the last page always appears?
I have used the following code:
Code
procedure TfmOrders.WPRichTextGetSpecialText(Sender: TObject; par: TParagraph;
PosInPar, PageNr: Integer; Kind: TWPPagePropertyKind; var IsLastPage,
UseThis: Boolean; var SpecialText: TWPRTFDataBlock);
begin
FWpInvoice.HeaderFooter.Get(wpIsHeader, wpraOnAllPages, '').RtfText.AsString := ‘FInvHeaderAllPages’;
if not IsLastPage then begin
FWpInvoice.HeaderFooter.Get(wpIsFooter, wpraOnAllPages, '').RTFText.AsString := ’FInvFooterAllPages’;
end else begin
FWpInvoice.HeaderFooter.Get(wpIsFooter, wpraOnLastPage, '').RTFText.AsString := ‘FInvFooterLastPage’;
end;
UseThis := True;
end;
Alles anzeigen
thanks in advance for any help,
Michael