Crystal Report 9.0 Page numbering
Hi
I have a report which is grouped on a column. I need to start each group on a new page and I have to reset page number on start of a new group. Finally I have to capture the number of groups created and the no. of pages per group on the front page followed by group details on the next page.
Suppose 3 groups get created , Gr1 has 3 pages, Gr2 has 4 pages , Gr3 has 1 page
Front Page will have
Gr1 : 3
Gr2 : 4
Gr3 : 1
This page will be followed by the details of each group.
I use a formula field which has a shared array to capture the total page no. created per group on change of each group. I set this at the Group footer
something like this:
shared numberVar array PageCount;
shared numberVar PTCount;
PageCount[PTCount]:=TotalPageCount;
PTCount:=PTCount + 1;
Then I use another formula field on the front page which returns the page no for a given group.
WhilePrintingRecords;
shared numberVar array PageCount;
PageCount[RecordNumber];
But the problem here is , when front page is being printed array wouldn't have been populated and hence prints as 0. How do I make the formula field in the front page evaluate in the end after all the groups are created and their total page nos. are captured in the array. Some thing like EvaluateAfter.
Your help is highly appreciated.
Regards
RJN
|