user1514173
user1514173

Reputation: 1

Quickreport - pagenumber does not increase when page changed

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

Upvotes: 0

Views: 2060

Answers (1)

Freddie bell
Freddie bell

Reputation: 192

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

Upvotes: 1

Related Questions