How to anchor subtotals at the bottom of the last page of an invoice with Microsoft Dynamics GP 2010 SP3.

6. Look at the top right of the template where the page number is. You should see a formula there. Highlight the whole formula and click CTRL-C to copy it.
10. In the formula change the / to =.
15. Ctrl-C (Do not cut because the end document bookmark is in this table, we can't delete the table from this section.)
18. Ctrl-V – You are pasting in the subtotal table instead of the word “subtotal”.
19. Now, you have to go back to the subtotal table in the body of the invoice - the one you copied. We can't delete the table because the bookmark is there. Highlight each field, right click remove content control. Then highlight the field and delete.
Dave Dusek
Senior Escalation Engineer
Comments
-
I've put this into place in GP2016 and it works for the most part. It seems that the footers do not print for some invoices. I'm not sure if the report just needs more time to load or what the issue is. But for example, I have a batch of 20 invoices. The footer prints perfect on the first 11 invoices but starting with invoice 12 through 20, the footer is blank. Any thoughts or ideas?
-
Hello Bob - I have seen that exact issue with this customization. I have entered a Product Suggestion to have the functionality changed.
-
I know this post is old but I was successful following this on a GP 2016 installation and it works great except when the user prints a range of invoices. Here's an example. We print a range of 4 invoices. The first 2 are one page invoices, followed by 2 invoices that 2 pages. The 2 one page invoices print fine as does the first 2 page invoice. However the forth invoice does not print any footer at all. Is that the page number issue mentioned at the top of this post?
-
-
Hi Dave, this is excellent, thank you. I have been able to get the footer printing at the bottom of the page but as Neil has stated below the Subtotal values are printing as XXXXX. I have tried to re-add the content control fields but I am unable to do this in the footer. Am I correct in copying the table between the " mark's? If I don't do this then the footer is blank? Thanks Deb
-
Hi Everyone,
I got this if/then thing to work in the header of the document, but not the footer (i.e. no good). Any idea why it would work in the header but not the footer?
-
Hi Andy,
Thank you so much for your reply. Yes, I do have all the bookmarks as you stipulate above. I have used GoTo to check the location of the bookmarks as well ( ][ ), and everything seems in order. I have also started from scratch a number of times just to make sure I'm seeing things correctly and have not accidentally deleted anything.
When I look at the bookmarks at template mode (i.e. when I go to Report Maintenance, and then modify the template, toggle ALT+F9 the fields, and look at the PAGE REF bookmark text, or simply go to Links>Bookmarks) I see that the text of the bookmark name is generic - i.e. StartTemplateDocumentBookmark, for example. The bookmark is definitely there. When I look at a generated template (i.e. print an actual order to template, and when open in Word I toggle the fields ALT+F9 or refer to Links > Bookmark), I see that the text of the bookmarks that appear in PAGEREF in the Page Header PAGEREF has changed to document specific (PAGEREF ORD00455213_8_1StartDocument). But the PAGEREF in the footer, when toggled, is still generic. When un-toggled, it displays "Bookmark not Defined". But - the bookmark is still there. It still exists.
I think.... it's probably because I'm on GP2010 SP2. I don't really have enough background knowledge to understand why a bookmark reference would behave differently in the header than it would in the footer... I always assumed headers and footers are essentially the same...just one at the top of the page, and the other at the bottom ;p Obviously there is something else at play?
-
Is that the actual print out of the Template? You would need to open the Template through Report Template Maintenance and take a look at the calculation to make sure it looks like the blog for Page Number. Next you will need to verify that you have all the bookmarks on the Template (Insert | Bookmarks). Here are the bookmarks I have
StartTemplateDocumentHeaderBookmark
StartTemplateDocumentBookmark
StartTemplateSectionRepeating
EndTemplateDocumentBookmark
EndTemplateDocumentFooterBookmark.
If you haven't already done some enable bookmarks, so you can see them by going to File | Options | Advanced (check the box for Show Bookmarks under Show document Content) in Microsoft Word. I am thinking you are getting Bookmark not defined because you are missing it on the Template.
-
Hi Dave,
This is wonderful, but I'm having trouble with PAGE REF on bookmarks when I place the PAGEREF in the FOOTER, I always get "Bookmark not defined".
When I toggle (ALT+F9) a generated template (say, an Order), I can see that the header's {PAGEREF StartTemplateDocumentBookmark} is actually replaced by the text {PAGEREF ORD00455213_8_1StartDocument}, as if there is some code that is running that is replacing the name of the the beginning and end bookmarks to include the document number in question. When I toggle {PAGEREF StartTemplateDocumentBookmark} in the footer, the text still appears as {PAGEREF StartTemplateDocumentBookmark} - when I untoggle, I get Bookmark Not Defined.
As a result, the solution you recommend above is not working (subtotal shows up on every page, rather than just on last page). I'm assuming this is because the basic PAGEREF bookmarks are not working in the first place.
I'm confused - since it seems to be working perfectly for others that have responded to this post. Anyone have any ideas?
Thx so much
-

Like
Report
*This post is locked for comments