Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1768
  • Last Modified:

Quick Report Page Numbering

I would like to put "page 1 of 3", "Page 2 of 3" etc... on each page of my quick report. Does anyone know how to do this?
0
eyager
Asked:
eyager
  • 3
  • 3
1 Solution
 
calinutzCommented:
On the Page Footer of the QReport place a QRLabel with the Caption" Page", close to it place a QRSysData component and choose on data property to be PageNumber.
0
 
calinutzCommented:
An then place another QRLabel next to the QRSysData... name it QRLabelX.
Then when you print the report, or preview it ... on the button from where you call the print or the previe place this code:

 QReport1.prepare;
 ...
 QReport1.QRLabelX.Caption := inttostr (QReport1.QRPrinter.PageCount);
 ...
 QReport1.preview;
0
 
eyagerAuthor Commented:
That gives me "Page 1", and "Page 2", but not "Page 1 of (total)", "page 2 of (total)" etc..
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
eyagerAuthor Commented:
Aha, the second comment did not post until after I posted. I will try it
0
 
eyagerAuthor Commented:
That works, thanks. Now the problem is that I am printing two separate reports, that need to have the page numbers compiled together... For instance, I have two 3 page reports that I want to print back to back and have consecutive page numbers. So page 1 of report 2 would actually say "Page 4 of 6", rather than "page 1 of three". Im only printing two reports back to back, no more than 2 ever, but I need the page numbers to display the total. what I have done so far is this:

Report1.prepare;
Report2.prepare;
TotalPages := Report1.QRPrinter.PageCount + Report2.QRPtinter.PageCount;

Report1.QRLabel5 := IntToStr(TotalPages);
Report2.QRLabel5 := IntTOStr(TotalPages);

Now I just need help with, on the second report, getting it to say "Page 4 of 6" on the first page instead of "Page 1 of 6".... Thanks for your help.
0
 
calinutzCommented:
You could use this:
Report1.QRLabel5 := IntToStr(TotalPages);

On your first report  use my code and on the second report use Report1.QRLabel5+Report1.PageNumber as PageNumber and TotalPages as sum of both reports.

And this is a different question....
You should ask a different question or increase the points if you have more than a question...
Cheers
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now