falkaholic Posted February 4, 2003 Posted February 4, 2003 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?
jasonwood Posted February 4, 2003 Posted February 4, 2003 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).
Vaughan Posted February 4, 2003 Posted February 4, 2003 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!
falkaholic Posted February 4, 2003 Author Posted February 4, 2003 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.
falkaholic Posted February 4, 2003 Author Posted February 4, 2003 Interesting idea, but still will make for some rough edges. I'll see if any more good ideas turn up before trying.
BobWeaver Posted February 5, 2003 Posted February 5, 2003 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","")
falkaholic Posted February 5, 2003 Author Posted February 5, 2003 Would it be best to turn on sliding for the fields so they don't take up space when its not the last page?
BobWeaver Posted February 5, 2003 Posted February 5, 2003 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.
jasonwood Posted February 5, 2003 Posted February 5, 2003 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?
BobWeaver Posted February 5, 2003 Posted February 5, 2003 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
harryk Posted February 5, 2003 Posted February 5, 2003 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
BobWeaver Posted February 5, 2003 Posted February 5, 2003 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","")
falkaholic Posted February 5, 2003 Author Posted February 5, 2003 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.
Robbydobbs Posted March 16, 2003 Posted March 16, 2003 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.
Vaughan Posted March 17, 2003 Posted March 17, 2003 If [status(CurrentRecordNumber) = Status(CurrentFoundCount), "text for footer", ""]
Robbydobbs Posted March 17, 2003 Posted March 17, 2003 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.
Recommended Posts
This topic is 8268 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 accountSign in
Already have an account? Sign in here.
Sign In Now