Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 227
  • Last Modified:

QR group and page number

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
Whytboy
Asked:
Whytboy
  • 2
  • 2
1 Solution
 
ZifNabCommented:
Hi Whytboy,

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

Regards, Zif.
0
 
WhytboyAuthor Commented:
Seems kinda odd that that functionality wasnt a thought in the design!  

Roger
0
 
ZifNabCommented:
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
 
JaccoCommented:
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
 
WhytboyAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now