Solved

QR group and page number

Posted on 1998-06-16
5
212 Views
Last Modified: 2010-04-04
The report I've got does a grouping of data.. sometimes the subgrouping is one page.. others it is two or more, Is there a way to reset the page counter so it resets with the group.forceNewPage, instead of counting up all the pages in the report. (Each group is a different Customer!)

It would be rather wierd to get the "first page" of a report and see it say "Page # 19" at the bottom!!

Roger Webb
0
Comment
Question by:Whytboy
  • 2
  • 2
5 Comments
 
LVL 8

Expert Comment

by:ZifNab
Comment Utility
Hi Whytboy,

I guess it's only possible if you use your own counter... Use the events to adjust your counter...

Regards, Zif.
0
 

Author Comment

by:Whytboy
Comment Utility
Seems kinda odd that that functionality wasnt a thought in the design!  

Roger
0
 
LVL 8

Expert Comment

by:ZifNab
Comment Utility
Yes, that's my idea also... they've have a reset and a ResetAfterPrint, but I believe this is only for aggregated functions... Zif.
0
 
LVL 10

Accepted Solution

by:
Jacco earned 50 total points
Comment Utility
For that purpose you shouldn't use the TQRSysData with PageNumber.

You should calculate the page number yourself.

Here is a comment on how to achieve that:

- put a normal TQRLabel qrlPageNo in the page footer of your
  report
- add a integer variable iPageNo to the Reports unit
- in the BeforePrint event of the TQRReport set iPageNo
  variable to 1
- in the OnEndPage event of the report add one to the variable
- in the Before Print of the GroupHeader reset the variable to
  1.
- in the OnPrint event of qrlPageNo label do
    MyLabel.Caption := IntToStr(iPageCount);

This way you create a partially calculated report.

Also fully calculated reports can be designed this way.

I hope I have helped you

Regard Jacco
0
 

Author Comment

by:Whytboy
Comment Utility
Actually, it works better if the reset back to page one is in the Group Header's AFTER Print.. not sure why.. just had a couple that started on page 2.  

Anyway.. that got me started!!!
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

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…
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

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

14 Experts available now in Live!

Get 1:1 Help Now