Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Printing page x of y

Featured Replies

  • Newbies

Can anyone help me figure out how to print running page numbers dynamically?

Here's the situation. I want the page numbers at the bottom or each page to display the current page and total page. The trick is, I always have a dynamic number of records to print, as well as a dynamic number of pages per record, and I want to restart the page numbers to '1' with each new occurence of a new record.

For example, record one may have four pages, in which case I want the footer to display 'Page 1 of 4', 'Page 2 of 4', etc. Record two may have 5 pages. It needs to print 'Page 1 of 5', 'Page 2 of 5', etc. I want to print all of the records at the same time (ie - one print job). Anyone have a custom function or calculation that can accomplish this?

This link will show you how to set the page # of #.

An option would be to temporarily store the recordids from the found set to a global field.

Use a looping script to find one recordid from the global at a time.

The above link shows how to add the page # of #.

This would be accomplished by the user running a single script, you may want to break it into several sub-scripts, with many print jobs.

Edited by Guest

  • 2 weeks later...
  • Author
  • Newbies

The link only describes how to set the total number of pages. What I need to do is dynamically determine the number of pages per record, not the total number of pages overall. For example, there may be 12 pages to print, and 4 records. The first record prints 2 pages, the second prints 4, the third prints 3 and the fourth prints 3. I need it to print '1 of 4', '1 of 2, '1 of 3' and '1 of 3' in the same print job with not user interaction or breaks.

I'm having a very similar problem that seems like it should be easy to solve, but is not. Hopefully we'll both be able to figure this out. The problem is inherrently the same.

I'm trying to have both per-record page numbers and total page numbers print, but can't find a way to do this. I can get either one to print, but not both. (Printing the whole document at once lets you do total page numbers, printing on a per-record basis using a loop lets you do per-record page numbers) There's a technique in that given link that keeps getting brought up where you go to the last page and get the page number, but there's no obvious way to do that on a per-record basis. If there was a way to count the number of pages in a specific record, this problem could be solved with a little math and simple logic.

Edited by Guest

That thread was pertaining to generating page numbers for each record.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.