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.

Invoice - Show totals only on last page

Featured Replies

I'm trying to make it so invoice totals only appear on the last page of the invoice.

I have a field, gLastPageNum, which keeps track of the total number of pages before printing.

I tried putting a calculated container covering the footer with the calculation,

If(Status(CurrentPageNumber) ? gLastPageNum, gWhiteContainer, "")

Where gWhiteContainer is a container in which I pasted a solid white rectangle the size of the footer (which I created in FM).

It's not working. Am I going about this the right way?

Have you tried using a Trailing Grand Summary part?

  • Author

Problem with that is it doesn't print at the bottom of the page

Try Case( Status(CurrentPageNumber) = gLastPageNum, total ).

  • Author

Hmmm... I could do that for each of the fields, but the graphics (lines) would still be there. I can live with that. Is the container trick supposed to work? I thought I had heard of that being done before.

Do you mean lines indicating a total below? If so, use the same calculation with a container result and paste your line(s) into the referenced container. I've done this with an insanely dynamic invoice layout where nearly all lines and summaries are calculations based on the data immediately above and below the current record.

I don't know about the container trick, but it seems easier to do the opposite and only show the result when you want to, not to try to hide it otherwise.

  • Author

Okay, thanks for the advice. I was just thinking maybe I forgot to check "Unstored", and I believe that would cause it to fail, so I'll check that tomorrow morning and if not I'll change things around.

Thanks.

  • Author

I noticed the calculated container will show up correctly if I move it up a few pixels so it begins on the body layout - but then it prints behind the text in the footer so as not to cover it up.

Any idea why --If(Status(CurrentPageNumber) ? gLastPageNum, gWhiteContainer, "")-- only evaluates correctly in the body part?

I'm assuming ? is <=, which means it would always evaluate as true. Have you tried Case( Status(CurrentPageNumber) <> gLastPageNum, gWhiteContainer )? The default null isn't necessary, nor does it make sense when using a container result.

  • Author

actually the ? was supposed to be a not equal to sign.

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.