Solved

Page no in quick report

Posted on 2001-06-04
3
1,116 Views
Last Modified: 2010-04-06
Hi Friends

Could any one help me out the following

1. How to reset page no in quick report

   Page no I am keeping in Page header band
   I am using Group header band , detail band and summary band. Detail band can have more than 1 page records
   depends on group header record change ( for ex. bill no change) I need to reset the page no

2. How can I count total pages in quick report.( For example I need to print like this, Page : 1 of 10 )

It could be grateful if I get procedures

Regards
Pandian
0
Comment
Question by:Pandian012000
3 Comments
 
LVL 8

Expert Comment

by:Cesario
ID: 6153115
Hi Pandian,

reset the page number for every group band.
This is not supported by the QRSysData control.  You will have to track the page number manually and assign the value to a TQRLabel.


To find the total numerber of the pages in your QuickRep:

  QuickRep1.Prepare;
  QuickRep1.ReportTitle := 'Total Pages :' +
      IntToStr(QuickRep1.QRPrinter.PageCount) + ' Pages';
  QuickRep1.QRPrinter.Free;
  QuickRep1.QRPrinter := nil;
  QuickRep1.Preview;

Best Regards

Cesario
0
 
LVL 1

Accepted Solution

by:
bnemmers earned 25 total points
ID: 6187557
Pandian,

On a TQRBand event "BeforePrint"
add the code to print the page x of n

This event will fire on each page


in the code below

 qrMain = the TQuickRep object.
   
 PageNumber is a public variable that I set
 after I did a print preview.
 and access "qrMain.QRPrinter.PageCount"
 

procedure TfrmTabletsRaw.phMainBeforePrint(Sender: TQRCustomBand; var PrintBand: Boolean);
begin
  qrlDateTime.Caption := ReportDateTime;
  if PageNumber > 0 then
    qrlPageNumber.Caption := Format('Page %d of %d', [qrMain.PageNumber, PageNumber])
  else
    qrlPageNumber.Caption := Format('Page %d', [qrMain.PageNumber]);
  qrlSampleCount.Caption :=  Format('SubGroup Count:  %d', [FSampleCount]);
end;

If you go httP://www,qusoft.com they have some examples
to download.

Bill.
0
 

Expert Comment

by:SpideyMod
ID: 8280597
Force Accepted

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
TVirtualStringTree  search using TEdit 7 121
Delphi cmd execution 6 60
Using idhttp to login to instagram 2 89
Error E2158 compiling with Delphi XE10 Seattle 2 99
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

775 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question