In file ovcrptvw.pas changing function CalcHPages as follows fixes this problem
begin
Result := 0;
LinesLeft := 0;
{DoneSectionHeader := False; oliver11111 2010/04/20}
{DoneSectionFooter := False; oliver11111 2010/04/20}
for j := 0 to pred(Lines) do
if not SelectedOnly or IsSelected[j] then begin
while LinesLeft <= 0 do begin
DoneSectionHeader := False; {oliver11111 2010/04/20}
DoneSectionFooter := False; {oliver11111 2010/04/20}
inc(LinesLeft, (LinesPerPage - PrinterProperties.PrintHeaderLines - PrinterProperties.PrintFooterLines));
inc(Result);
end;
The original code is counting the header lines only once per report instead of counting them for every page.
In file ovcrptvw.pas changing function CalcHPages as follows fixes this problem
begin Result := 0; LinesLeft := 0; {DoneSectionHeader := False; oliver11111 2010/04/20} {DoneSectionFooter := False; oliver11111 2010/04/20} for j := 0 to pred(Lines) do if not SelectedOnly or IsSelected[j] then begin while LinesLeft <= 0 do begin DoneSectionHeader := False; {oliver11111 2010/04/20} DoneSectionFooter := False; {oliver11111 2010/04/20} inc(LinesLeft, (LinesPerPage - PrinterProperties.PrintHeaderLines - PrinterProperties.PrintFooterLines)); inc(Result); end;
The original code is counting the header lines only once per report instead of counting them for every page.