Approach User Support homepage Approach User Support
Answers to Frequently Asked Questions about Lotus Approach
Examples LotusScripts
Example databases
Links to other Lotus Approach support services

[Return to contents]

Total page counts on Reports

Last updated: 11 Mar 1998

There is no automatic function to do this, so basically you have to get your Report to work it out itself. The following two methods have been submitted:

Method 1: using imbedded IF statements:
--------

Create a calculated field with the formula:

if(SCount(Surname) <= 25, 1,if(SCount(Surname) >25 and SCount(Surname)
<= 50,2, If (SCount(Surname)> 50 and SCount(Surname) <= 75,3,4)))

This presumed that the surname field would be on every record and
that their would be a maximum of 25 records to the page and that I would
never have any more than 4 pages worth. You will need to adapt it to your requirements.

Then placed the normal page counter field with this field next
to it. Eg: Page 1 of 4

Note that this formula will only give the correct result for a particular printer type and page layout. If either of these change you will need to check the formula.

Method 2: using 3 calculated fields
--------

Create three calculated fields PCOUNT1, PCOUNT2 and PCOUNT3 using the following formula:

PCOUNT1:

     (SCount(CONTENTS) + 4) / 90

PCOUNT2:

     Trunc(PCOUNT1, 0)

PCOUNT3:
     If(PCOUNT1 > PCOUNT2, PCOUNT2 + 1, PCOUNT2)

Then put the following in a text block in the header or footer of
your report:

Page <<#>> of <<PCOUNT3>>

[Return to contents]

© Copyright, JohnBrown, Trademarks, Disclaimer, Acknowledgements.