TurboPack / Orpheus

Orpheus is an award-winning UI toolkit for Embarcadero Delphi & C++Builder
Other
98 stars 36 forks source link

ReportView doesn't print all pages #15

Closed oliverClimbs closed 3 years ago

oliverClimbs commented 5 years ago

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.

oliverClimbs commented 5 years ago

Looks like this bug fix still didn't make it into the current release of Orpheus.

rpottsoh commented 5 years ago

Submit a PR

oliverClimbs commented 5 years ago

Did my first PR - hope I did everything correctly ;-).