Solved

QR group and page number

Posted on 1998-06-16
5
219 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
[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
  • 2
  • 2
5 Comments
 
LVL 8

Expert Comment

by:ZifNab
ID: 1353046
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
ID: 1353047
Seems kinda odd that that functionality wasnt a thought in the design!  

Roger
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1353048
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
ID: 1353049
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
ID: 1353050
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

Industry Leaders: 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

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…
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, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

707 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