Take the 2-minute tour ×

I am using the OnNeedData feature with an array feeding a number of qrLabels in a detail band configuration - (Delphi 2010 and QuickRep5) - On a multi-page report, I need to detect every next page (2, 3, 4 etc) and modify the first line in the detail band.

Everything works fine except that the internal page number variable (QuickReport.QRprinter.pagenumber) does not increment before the first line is printed (or shown).

As an exemple, if I print a spam removed of labels with the caption equal to the page number, the first line of page 2 will show Page 1 and the rest of the lines on that page will show correctly Page 2 same thing happens for all other pages.

Can someone help me to find a way to properly identify the beginning of a new page, I have tried OnEndPage, OnStartPage, BeforePrint, etc. without success - the counter always increment after the first line of the detail band has been printed...

Thank you

share|improve this question

1 Answer 1

  • Make sure that the Quickrep1 has a PageheaderBand
  • Then examine the QuickRep1.QRPrinter.PageNumber in the OnBeforePrint event handler of that PageHeaderBand.
share|improve this answer

Your Answer


