dvalley Posted July 7, 2005 Posted July 7, 2005 I wish to put in the header of my form a "Page x of y Pages" counter. In FM5, I had to write a script to go to preview mode, count the pages and insert that number into the "y" page number. I thought I heard that this was simplified in FM7. Has it and how is it done?
rtor451 Posted July 7, 2005 Posted July 7, 2005 You can do "Page 1 of 4" quite easily. Step 1: Create a global number field (g_total_pages). Step 2: Insert the following into your script before displaying the form Freeze Window Enter Preview Mode (NO Pause) Go to Record/Request (last) Set Field (g_total_pages, Get(PageNumber)) Go to Record/Request (first) Enter Preview Mode (Pause) Step 3: On your layout, enter the following: Page ## of <<g_total_pages>>
dvalley Posted July 8, 2005 Author Posted July 8, 2005 That is what I have been doing in FMP5. I was hoping that 7 had a non scripting way to do this...Oh well. Thanks for the reply.
VICH Posted July 28, 2005 Posted July 28, 2005 i have a way to do it with caculation fields first you do an insert page numer in your header nad you get hte "#" symbol when you are in preiview mode it will show what page you are on that is your" Page ____ " for the total number of pages the "of ___" part you have to create a feild that is a summary field, it hsould be called something like "total count" and set it to a summary field and select count, and then choose a field that has something in it on every record, then enter this calculation in to a new caculation field =IN((sum(total count, total count)-1)/x)+1 x should be the number of records that fit on a page and that should do it if it doesn't make sense email me at [email protected]
PatriciaW Posted July 30, 2005 Posted July 30, 2005 Another way to do it is to define an unstored calculation field in each table with this calculation: Get ( RecordNumber ) & " of " & Get ( FoundCount) Then just insert this field into your layout.
Vaughan Posted July 31, 2005 Posted July 31, 2005 Both of these techiques assume that a constant and integral number of records filt on each page. I my experience this is rarely so, and the only reliable method is to preview the pages, change to the last page and store the last page number into a global field.
Recommended Posts
This topic is 7056 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now