Modifying Microsoft Dynamics GP 2010 Word Templates

David Meego - Click for blog homepageMicrosoft Dynamics GP 2010 added some very cool functionality to the product which allows reports to be generated in Microsoft Word.  It is perfect for creating custom layouts with logos and graphics for Sale Order Processing (SOP) and Purchase Order Processing (POP) documents.

This functionality leverages the Dexterity Report Writer as an engine to gather information and export it as XML data.  This data is then read by the Microsoft Word template to produce the document. 

If you want to get additional data, you need to modify the standard report using Report Writer so that the additional information is included on the modified version of the report.  Make sure the Alternate Modified Forms and Report ID has been changed to use the new report and the data will now be available for the template to use. 

So you might ask ... Where in the file system can I find the template documents to edit?

The answer is nowhere.

The templates are not stored in the file system at all.  To provide a central repository for the templates so they can be accessed by any user from any workstation, they are actually stored in the DYNAMICS.dbo.syReportTemplates table on SQL Server. Note that this table is not defined in any Dexterity dictionary.

Below is a quick step by step guide to creating a modified template:

Part 1 - Creating a new template from the original

  1. From the menus, select Reports >> Template Maintenance.
  2. Click on the Report Name (where it says "Click here to select a report").
  3. Click on the report is already in the list or select More Reports and navigate to the report you wish to modify.
  4. Click New and select From Existing Template.
  5. Select the Template from the list that is to be the starting point for the new template.
  6. Enter the New Template's Name and click Create.
     

Part 2 - Modifying the template

  1. In the Available Templates list select the newly created template.
  2. Click Modify to open Microsoft Word with the template loaded.
  3. Make the changes as desired.
  4. Select File >> Save As.
  5. If using Microsoft Word 2010, make sure the Maintain compatibility with previous versions of Word option is checked. The template must be saved in 2007 .docx format not 2010 .docx format.
    Note: If you don't check the Maintain compatibility option, we have seen issues with the Template Processing Engine occur including xml errors or processing failing to complete.
  6. Save the template to a known location, for example: Your desktop.
  7. Close Word, or at least make sure the template document is closed. This will prevent an error on the next step.
  8. Click the green plus sign to Add a template.
  9. Locate the previously saved document and click Open.
  10. Select "Yes" when asked if you wish to replace the existing template.

Part 3 - Assigning the template

  1. In the Available Templates list select the now modified template.
  2. Click Assign >> Company. Check the appropriate companies and click Save.
  3. Click Assign >> Customer (Debtor) or Vendor (Creditor).  I will refer to Customer for this example.
  4. Click the green plus sign and select the appropriate Customers by Customer ID or Customer Class. Don't worry if your range includes extra customers or classes as they can be removed in the next step. Click OK.
  5. If there are any customers or classes added which need to be removed, mark the checkbox to the left of the customer or class and click the red cross to delete them.
  6. You can continue adding customers or classes as needed.
  7. Once your have completed your selections, click Save.

Note: You can also right click in the Available Templates window to perform most of the actions for the window.

For more information on Word Templates and how to use them, please look at the printable manuals installed with Microsoft Dynamics GP. You will find an entire section In the System Setup Guide (SystemSetup.pdf), look at Part 7: Chapter 34: Word templates. [Edit] There is also a huge amount of information in the Report Writer User's Guide (ReportWriter.pdf), look at the Part 9: Word Templates (Chapters 34-39).

Thanks to Rob Wagner on the Dynamics GP development team for the great work in developing this functionality. 

David

02-Jun-2010: Added details of Word Templates section in the Report Writer manual. Thanks to Steve Kubis for pointing that out.

01-Dec-2010: Added link to Mariano's post: Microsoft Dynamics GP 2010 Word Templates summary.

06-Dec-2010: Updated section on Maintain Compatibility option for Microsoft Word 2010.