Jump to content

Invoice - Show totals only on last page


jasonwood

This topic is 7233 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 7233 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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