Word Template Debugging

Dave Dusek - Click for blog homepageRecently, I have been looking a lot of Word Template cases - I'm the primary Escalation Engineer on that feature.  Since Word Templates are new to GP 2010, I want to get some blog articles written on some of the common issues we are running into.  So this will probably be a series of Word Template posts. 

For the first post, I want to make sure everyone is aware of some logging capbability that we have with word templates.  The logging will come in handy if your problem has something to do with the Word Template not printing a document.  So for example, you are trying to print an invoice to a Word template and you receive an error message something along the lines of this:

"One or More templates could not be processed. View the exception log for more details." 

And the template won't print.  Or you could possibly get other scenarios as well.  Bottom line is that we have some logging that we can take advantage of to help us determine where the problem is.  There are two DEX.INI settings you can add and these settings will produce a few things. 

DEX.INI settings

KeepTemplateTempFiles=TRUE
TPELogging=TRUE

When you have these settings in your dex.ini, multiple files will be created in the %temp% folder:

  1. Log file
          -TemplateProcessing129357796245864818.txt
     
  2. The Document
          - Fabrikam, Inc. Invoice [-STDINV2322-]2011.02.23_16;07;27 ~1-1.docx
     
  3. The Template
          -Template Invoice 1~1 1~1.docx

Since these are in your %temp% folder, you will want to sort by Date Modified and that should bring these files up to the top for you.  Once you have the files, then look at them.  If you open the TemplateProcessing.txt, what does it show?  Can you double click on the document itself to open it up?  How does it look?  Does the template look correct, is that the one you are expecting? 

Then we just go from there.  If you need to create a support case, the first thing the engineers should ask you, is for these three files along with the package file of the report.  We can easily import the package file and the template and try to reproduce your situation. 

Make sure your remove these settings from the DEX.INI when done so you don't fill up your temp directory. 

In the next posts we will analyze some specific issues. 

Dave Dusek