Solved

QR group and page number

Posted on 1998-06-16
5
216 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

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

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…
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…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

733 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