Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula for numbering pages

Status
Not open for further replies.

rsknut

Programmer
Jul 3, 2003
15
0
0
US
Hi,
Is there any way to have two different PageNofM on a report? I want to be able to show the number of pages of a particular item at the top and the number of pages for the entire report at the bottom.

i.e. -
Page Header - Page 1 of 4
Page Footer - Page 1 of 72

Thanks in advance!
 
I'm not sure about the "Section X of Y" formatting, but I do have two SectionPage formulas that I use a lot.

PAGE HEADER

Name : {@AddSectionCurrentPage}
FormulaShared numberVar SectionCurrentPage := SectionCurrentPage + 1;

-------------------------

GROUP FOOTER

Name : {@ResetSectionCurrentPage}
Formula : WhilePrintingRecords;
Shared numberVar SectionCurrentPage := 0;


-------------------------

It will give you a page count for the group, but not thr "TOTAL PAGE COUNT" for the group...I'll think about that one....
 
You might try defining what this particular item is, as item isn't an entity in CR.

MYRBIM demonstrated how to create a manual page numbering scheme for a Group level (again, what is an item?), to get the total pages for the report, just use the Crystal supplied function:

PageNofM

-k
 
The item is a set of inventory item ids. The user can enter a range of inventory item ids for reporting. In the report I want to specify how many pages each inventory item uses (i.e. using the PageNofM function in the header section) and the total number of pages in the report (again using the PageNofM in the footer section).

Hope this helps?

Thanks
 
rsknut, look again at the advice you've already been given. Crystal will only keep track of one page count, though you can reset it. What you need to do is create another count and make it look like a second page count.


Madawc Williams
East Anglia, Great Britain
 
Sorry for this stupid question. But is there any reference describing formulas like

WhilePrintingRecords;
Shared numberVar SectionCurrentPage := 0;

and their use.

I had a look at the Help files provided with CR, they are really basic.
 
Actually this is not as easy as it looks on first read.

The difficulty is getting the number of pages for each GROUP...I will assume that "Item" is the same as Group...as well as the number of pages of the total report.

TotalPageCount can only be used once. If you have the page number reset after each group in the footer....TotalPageCount gives you the total pages for the group....but you cannot get the total number of pages for the report til you add them up But then you cannot backtrack.




Jim Broadbent

The quality of the answer is directly proportional to the quality of the problem statement!
 
Please help! I have used this counter and it works great. How can I get an alert if the counter is greater than 1?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top