Solved

Page no in quick report

Posted on 2001-06-04
3
1,142 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: 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!

Question has a verified solution.

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

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…

732 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