?
Solved

Page no in quick report

Posted on 2001-06-04
3
Medium Priority
?
1,167 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 75 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses
Course of the Month15 days, 15 hours left to enroll

743 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