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.

Printing a value at bottom of last page-PROBLEM

Featured Replies

  • Newbies

Using v3.0v6 on NT

I'm trying to print a total at the bottom of the last page of a report. I have used the suggestion found in the support database--Adding Continued on Next Page Formatting to Reports--by creating a number field, a calc field comparing the number field to the current page number. Then setting the field in a script.

The problem is the report looks fine in preview mode, but when I print it still puts the value on every page. Suggestions?

You need to create two fields:

gPageCount (global, number)

Display (calculation, text) =

If( gPageCount = Status(CurrentPageNumber), "Show This", "")

And a print script

Enter Preview Mode

Go to record/request/page (last)

SetField(gPageCount, Status(CurrentPageNumber)

Print

The value in the number field you are using changes with each record, you need to use a global to capture the page count.

-bd

I tried it with a single record, multi-page layout. I had some concern that the calculation field wouldn't be evaluated twice for the same reocord, but it work fine in both FM 3.0v4 and FM 5 on the Mac. Send me the file and I'll have a look. -bd

  • Author
  • Newbies

Thank you for your reply.

I abandoned the fields that I had been working with and used your example - step by step- just in case I was missing something.

Again, I get the same result. In preview it looks good. When it prints, I have "Show This" in the footer of both pages.

In this test I have singled out one record that prints across two pages of a form. Basically a two page purchase order.

The interesting thing, the script moves the preview to the last page, sets the field, then prints, leaving the view in preview mode on the last page. If I click between page one and page two (in preview mode) it looks exactly how I want it to print. If I stay on page two (the last page)and click print it prints "Show This" in the footer of both pages. If I go to page one and click print nothing is printed in this DISPLAY field on both pages.

Any other suggestions?

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.