Jump 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.

Sequential Page Numbering for Multiple Reports

Featured Replies

I've got a script that creates printed reports from multiple database tables. What I am attempting to do is to produce sequential page numbering so that the first page of the first report is 1 and if that report is 3 pages long, the first page of the second report would be 4 and so on.

I've tried the Global variable suggestion that was posted for the Page x of xx solution but it isn't working. Where I would normally place the page number, I'm using Get ( Page Number ) + $$gv_page_number where $$gv_page_number is supposed to be a running total of the number of pages printed so far.

It appears to be incrementing correctly, but the Global field which has the calculation in it ( Get ( Page Number ) + $$gv_page_number ) doesn't appear to be calculating.

Any suggestions?

Try putting the last page number into a global field (or a variable), and using an UNSTORED calculation field to display the result of your formula.

  • Author

Although I've tried it just as a part of debugging (and it didn't work), it won't work in the long term because these reports have multiple pages each and I need the ( Get ( Page Number ) + $$gv_page_number ) to calculate the current page at the time the pages are generated.

The fact that we've got local and global variables (i.e. $ and $$) but can't use them directly on a layout is so frustrating.

Edited by Guest

I am not sure I understand the problem. The fact you can't put variables directly on a layout may be frustrating, but using them in an unstored calculation field and placing the field on a layout should work fine.

  • Author

I think that the problem may be that I am dealing with multiple tables, each producing their own report. Some are joined, some aren't. I took this down to a simple one table database and I was able to get it to work successfully. Now I need to put it into the correct spot (i.e. which table should I put the unstored calculation field into?).

My frustration with FileMaker's use of variables is that almost any other environment that I've worked in allows you to use variables in a report. I could understand in version 8 when they were first introduced, but we have now had 2 additional versions and they are still not supported directly in layouts while things like merge fields are.

Let that be the most serious flaw you'll ever encounter when working with Filemaker...

The unstored calculation SHOULD be in the table you are printing from - although it CAN be in any related table too, as long as it only uses variables, global fields and Get() functions.

Create an account or sign in to comment

Important Information

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

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.