Re: Total Pages count
"Monir-SCS" <[email protected]> Wed, 4 Sep 2002 17:57:53 +0200
| Newsgroups | gmane.comp.lang.delphi.quick-reports |
|---|---|
| Message-ID | <000001c2543b$21136cc0$0100a8c0@homexp> |
Thank you Tom, I should read the FAQ before I post. Monir. ----- Original Message ----- From: "Tom Nesler" <[email protected]> To: <[email protected]> Sent: Wednesday, September 04, 2002 3:28 PM Subject: Re: [quick-reports] Total Pages count > Hi Monir! > --- Monir-SCS <[email protected]> wrote: > > Hi, > > I want to print the total number of pages in the title of Quick > > Report, the > > QRSysData print current page number only, any idea how? > > > > Monir. > > What you need to do is use the Prepare option to capture the total > number of pages and put it in a global variable. Prepare 'prints' your > report but does not display it. Here is an example (From the QR FAQ > section). > > Q: > How can I determine the number of pages in my report before I preview > or print it? > > A: > If you call the report's Prepare method, it will generate the report > without printing or previewing it. After Prepare has finished, the > pagecount will be in the report's qrprinter.pagecount property. Please > refer to the manual topic on TCustomQuickRep.Prepare for more > information. > Example: > > QuickRep1.Prepare; > QuickRep1.ReportTitle := 'This report has ' + > IntToStr(QuickRep1.QRPrinter.PageCount) + ' pages'; > QuickRep1.QRPrinter.Free; > QuickRep1.QRPrinter := nil; > QuickRep1.Preview; > > In This example the data is put in the Title but you could put it inot > a label on your page header band. > > Good Luck! > > ===== > Tom Nesler > > Live Long...Code Well... and Prosper! V > > __________________________________________________ > Do You Yahoo!? > Yahoo! Finance - Get real-time stock quotes > http://finance.yahoo.com > > > ============================================= > QReport Artist 5 - http://www.mensand.com/ > The new version is available for Delphi 5.0 , > Delphi 4.0 and Delphi 3, BC++Builder 3.0. and BC++Builder 4.0 > ============================================= > > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ > >