The Word templates for creating Invoices, Purchase Orders, Remittances, Statements and any other number of documents that were first introduced in Microsoft Dynamics GP 2010 have become an integral part of any new implementation or upgrade project. They have great functionality, but can be a little tricky to get right.
There are so many things I have learned along the way that I sometimes wonder how I ever got started at all. Now as I think about how to train someone else on how to do them I wanted to put together a bit of a quick tips for getting started. Lots of blogs have been written about some of the detail – if I know about them, I have referenced them here.
Start with Report Writer
All the Word templates are based on the core report writer template. The sections need to exist and the fields need to be in the sections for them to show as available for selection on a Word template. You don’t have to have a really pretty report, but here is what you do need to ensure is in place before you take the xml into the Word template.
- Fields: create all the calculated fields you want. Make sure all fields (calculated or already existing) are pulled onto the Report Writer layout in the correct sections. The sections matter greatly.
- Make fields big enough: I found this one hard to believe – but then I am not a developer, so it may make sense to others. The width of the field in Report Writer matters. So particularly for text fields (comments, addresses etc), ensure you make the fields quite wide. End result if you don’t, the field truncates in Word.
- Use Report Headers and Footers: some reports only use a page footer. I helped someone out with this one recently. The report he was trying to modify only had a page footer and the fields, while showing in the selection list, would not print on the report. When I added a Report Footer section and moved the fields, they then showed.
Once you have your base Report Writer template in place, then you are ready to try your hand at the Word template. Rather than recreate information that is already available, this blog from David Musgrave gives all the details you need to get the Word template activated and assigned to the company: http://blogs.msdn.com/b/developingfordynamicsgp/archive/2010/05/31/modifying-microsoft-dynamics-gp-2010-word-templates.aspx
Things to note:
- Templates are saved in the database: once you add a template back into Dynamics GP via the Template Maintenance window, this template is saved in the database. This means if you click modify in that window, it opens in a temporary location that can be hard to find. But it does also mean that once in there, it is backed up with database backups.
- Use a shared location to save masters: when doing these reports for clients, one of the first things I do is “Save As” (ensuring I maintain compatibility) to a shared network location. That way I can easily make changes and navigate back to the location to add into Dynamics GP. If I am not sure if the template in the master location is the latest, I can click Modify in Dynamics GP and save over the top of my existing report.
Working with the Word Templates
- Always work in the tables that are there. You can add rows and columns, merge cells, split cells, delete rows and columns as needed (be careful not to delete bookmarks). To easily see the tables, choose to “View Gridlines” from the borders list in the Home tab in Word. This lets you see the outlines of the tables without having to permanently add borders to cells.
- Put a single piece of data in a cell. Don’t try to merge two fields in one cell – set up cells for each piece of data. This can be time consuming to get the right combination of cells to have say 5 rows on the left of the table and 7 on the right but the end result is much nicer to look at. The cells give you natural alignment of the fields.
- Enable Bookmarks and show them. To enable Bookmarks go to File à Options à Advanced à Scroll Down to Show Document Content à Check the box for Show bookmarks. This will print as a grey capital “I”. They will not print when you send them to a printer. The bookmarks are used to create the page sections, page numbers and lots of other “developy” things. Without them, your report may not function at all. If you have deleted them, it is pretty easy to add them back in. In the Word Document go to the location you would like the Bookmark click Insert à Bookmark and enter the Text of the Bookmark. If you are not sure what the name of the Bookmark is you can create a brand new Template and go to the same path to see what the name is.
- Use Formatting from Word. The beauty with these templates is you can use all the advanced formatting from Word – colourful reports, different fonts and styles.
- Keep some masters. This is particularly for those of you that do this for many clients. Keep copies of layouts you have done – you can then use these as a base rather than starting from scratch each time. Work smarter – not harder! But you only need the master of each type i.e. SOP Blank Invoice (you don’t need credit note and history documents as you will use the copy below to create those).
- Save, Save, Save. A minor change to the document template can stuff the entire template. Make sure you take a backup of what you are working on regularly during the process. Save as and rename it at different points so you can go back to an earlier version.
Copying Reports
Those of us that have been around for a while are very familiar with taking the Work version of a report and using Notepad to make it the History version. While this method still can work effectively, please note the following blog article that details some potential issues:
Copying can also be useful in the Word templates. Get the first one right e.g. SOP Blank Invoice. Get the stakeholders of the report to sign off on the layout and design. Once that is done, you can then use this as the base for the History and Credit Note layouts.
- Set up the new report template and save it in the Master location.
- Open your modified version and “Save As” over the top of the new report. Close the reports.
- Open your new version and change out the xml file to the relevant one e.g. SOP Blank History Invoice. Switch any fields that may need changing.
- Attach your report back to GP and test. Make any changes you need.
Useful Articles
I have certainly made use of a number of articles that have already been published to either troubleshoot issues or enhance my reports. Here are some you may find useful:
- How do I see the Developer tab: https://community.dynamics.com/gp/b/dynamicsgp/archive/2011/06/29/adding-the-developer-tab-in-microsoft-word-after-installing-the-microsoft-dynamics-gp-add-in-for-microsoft-word-video.aspx
- My logo won’t print: http://dynamicsgpblogster.wordpress.com/2010/09/30/how-to-resize-logo-in-microsoft-dynamics-gp-word-templates/
- How do I anchor totals to the bottom of the page: https://community.dynamics.com/gp/b/dynamicsgp/archive/2012/08/21/how-to-anchor-subtotals-at-the-bottom-of-the-last-page-of-an-invoice-with-microsoft-dynamics-gp-2010-sp3.aspx
- Adding a Terms and Conditions Page to your Invoice: http://dynamicsgpblogster.blogspot.co.nz/2010/09/how-to-add-terms-and-conditions-page-to.html
If you have any articles that you use, feel free to add them to comments at the end of this article.
Working with these templates does take practise and I don’t think there would be a consultant out there who would disagree with that. The first one I did, I think I started from scratch at least four times – I think it took me nearly two days! But now that I have got the hang of them (until the next issue I hit), I really like working with them. The end result is much nicer than anything that had ever been produced in Report Writer.
Heather Roggeveen is a MS Dynamics GP Consultant with Olympic Software. After 15 years of working with the end user all the way from designing the solution to user training, she has become a Dynamics GP expert. Heather regularly shares her knowledge, including tips and tricks for end users in her blog articles. Follow her on Twitter @HRoggeveen to be notified of her latest articles. You can also like Olympic Software on Facebook or follow us on LinkedIn or on Twitter @OlympicSoftware. For more information about Dynamics GP and how it could benefit your business, view the Dynamics GP page on our website or give us a call, 09-357 0022.
Another little one to add to the list. I was trying to add a text field to a small table today – in general, the text would print as a relatively short field, but the actual data field when you add it can be long. My table kept resizing on me causing formatting issues. So, select the table, go to table properties, on the Table tab choose the Options button (bottom right) and deselect the option to “Automatically resize to fit contents”.
Hi Heather,
Have you been able to solve the issue of printing page numbers on invoices and have them print correctly when printing invoices from a batch? eg. Page X of Y in batch of multiple invoices.
Hi Philip – I hadn’t resolved this. It seems to me if you don’t touch the page numbering from the original template that it will work OK. I have never had any luck moving the position of the page number though. I recently deployed a new template for a client who wanted the page numbering, and I haven’t had any feedback that it is not working. Mostly, I try to avoid having to put it on.
I inserted new page number format from within Word and it displays/counts pages fine.
I have a huge problem. The Subtotal table breaks over onto a new page when the body fills up. How can I group the table holding the subtotals so that that info stays together and is not split over 2 pages?
Hi Neil – did you get this resolved? The subtotal breaking over multiple pages is the main reason I put the totals into the Word footer. Then it is nice and clean and doesn’t “float” based on the length of the invoice. It does mean however that it prints on all pages – but most of my clients are perfectly fine with that. And as an ex-data entry person, I would have no issue with it either.
When I print a Statement the pages are not grouped by Customer – the page numbers shows 1 of 100 if there are 100 pages in total across the debtors included in the statement run. How do I get page numbers to show 1 of 3 pages if a particular customer’s statement has 3 pages included int he statement run?
Hi Neil – did you get this resolved? Does the numbering work correctly in the standard report writer report? If not, it may be the grouping within report writer.
Hi, is there any way that I can get the vertical lines to print all the way down to the footer as per the RW invoice. I have anchored the totals to the bottom of the line but not sure how to bring the vertical lines down with them. Thanks
Hi Deb – I haven’t tried to be honest. I have personally never liked the vertical lines on the invoices, so have always removed them even in report writer. If you haven’t managed to resolve it, you could try a post on the Dynamics GP Community Forum: http://community.dynamics.com/gp/f/32
Heather,
Just wanted to say thanks a lot for your comprehensive review (here) and for your help in the forums. It’s been invaluable!
Thanks very much Hila – the feedback is appreciated.
the only way I have been able to do this is to put a watermark on the document to draw all of the lines
Hi Heather,
Do you know if it is possible to get the inventory account number for a purchase order on the word template?
I was able to do this in report writer by creating a new table link, etc. but still, with this done in RW, creating the new xml source for the word template didn’t seem to carry over into the word template. Is this supposed to be doable and I missed something or adding tables to RW reports doesn’t carry over to templates?
Thanks for any help or guidance.
Hello Heather,
I was able to get the account number onto the PO template; however, only by placing it in an adjacent column to the right of the item description.
I was hoping to place this below the item description by splitting the item description cell into two… I did not get that to work… any thoughts as to why that wouldn’t work?
Thanks.
Hi George
Sorry for the delayed reply – I didn’t see the comment. I think the only possible way to do it is a carriage return in the Item Description line. While I haven’t dealt with this particular scenario, I have had other ones that are similar. It is almost like each line in the table is linked to a different section in the RW template.
George,
If you want two or more lines in the item section, you need to nest tables. You create a table within one of the cells holding the data you want.
Leslie