Solved

Page no in quick report

Posted on 2001-06-04
3
1,095 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

762 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now