July 7, 200520 yr 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?
July 7, 200520 yr 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>>
July 8, 200520 yr Author 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.
July 28, 200520 yr 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]
July 30, 200520 yr 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.
July 31, 200520 yr 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.
Create an account or sign in to comment