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 footers at bottom of last page

Featured Replies

One of my weakness(es) has been layout parts.

I'm trying to have the basic invoice total at the end of a printed invoice. My invoicing usually didn't span more than one page, but this one offen goes for 2 or 3. I've tried Footer, but it prints on every page - I just want it on the bottom of the last page. I've tried Title Footer, but it prints on just the first page. I've tried Trailing Grand Summary, but that doesn't print at the bottom always, it can print in the middle of the page depending on where it ends.

This should be simple, how can I get it to print on just bottom of the last page?

Until you asked, I've just take it for granted that it wasn't possible, but your question made me think of a possible solution.

You could make a calculation field which would cover up the totals at the bottom of the invoice if Status(CurrentPageNumber) is less than the total number of pages. Problem is, I don't know how to find out the total number of pages (especially if the size of your line items is variable).

An idea to try:

The footer prints the data from the last record on that page. (Headers print the data from the first record on that page.) What if you made a calc field that was null except if it's the last record in the found set, and put this field in the footer?

I dunno. Try it and let us know the outcome!

  • Author

Good thinking, but its wouldn't be prefect, since the footer takes up roughly 1/5 of a page (subtotal, taxes, total, company address etc), there is will a bunch of white space. I might be better of with Trailing grand, and make some buffer records.

  • Author

Interesting idea, but still will make for some rough edges. I'll see if any more good ideas turn up before trying.

I've done this. But, you have to know in advance how many pages you will have. You can either calculate this from the number of items on the invoice, or else include the following steps in your print script:

Enter preview mode

Go to Record/request/page [last]

Set Field [gPageCount,Status(CurrentPageNumber)]

Enter browse mode

Then, just use a regular footer, but make all your footer fields unstored calculations of the form:

Case(gPageCount=Status(CurrentPageNumber), "Stuff that appears on last page footer","")

  • Author

Would it be best to turn on sliding for the fields so they don't take up space when its not the last page?

You can't make the footer shrink, so it won't make any difference.

However there is a workaround method that involves using a header that prints at the bottom of the page (I'm not kidding). It's easier to show with a demo than try to explain it. I will set one up and post it later.

What about my idea about using a calculated container field to put a white box over all of the footer fields? Wouldn't that be easier than making each field (and labels!) calculation fields?

Actually, yes your idea is the simplest as long as the footer area is always the same size. From what Eric has said though, I assumed that the footer on the last page needs to be bigger than on the previous pages in order not to waste space.

Here is a sample file that does this. It's a bit complicated, but does what is required. There may be simpler ways to achieve the same thing.

InvoiceLineItems.fp5.zip

My idea would be, reading all the other suggestions, to put the information not in a footer, but in a subsummary part. Only thing is, you cannot force it to print at the bottom of the last page.

The subsummary part must be sorted by a calculation field that you set up, using some sort of mod calculation that the value increments only once after the last record. don't know if thats possible, should figure that out.

try something like this for the calculation:

if(status(currentrecordnumber)=status(currentfoundcount);1;0)

so the value increments at the last record. Might be that it just occurs one record to early..just before the last and that your subsummary part occurs just before the last record..I fear so..

Anyhow, some other gurus may shine their knowledge-torches on this.

Harryk

Come to think of it, using Vaughan's idea of checking if the field is the last one on the invoice, makes it unnecessary to count pages. So, the case function would become

Case(Last(selfjoinByInvoiceNo::recordID)=recordID, "Stuff that appears on last page footer","")

  • Author

Looks promising thanks! You weren't lying when you said it was complex. Don't fully understand it quite yet. I might just for a 2 layout system where a layout with a footer is printed when it is one page, then use a trailing grand summary otherwise. Still don't have to have this done for a week or two, so there is time to decide.

  • 1 month later...

What if you made a calc field that was null except if it's the last record in the found set, and put this field in the footer?

Vaughn, How would you write the calculation to this? I believe that this would work perfectly for what I am doing, but I don't know how to write the calculation.

If [status(CurrentRecordNumber) = Status(CurrentFoundCount), "text for footer", ""]

I would like to thank everyone for helping me out on my invoice problem. I finally have it figured out and I'm very pleased with the outcome.

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.