Book a Demo

Author Topic: DocumentGenerator not Using Template with Defined Documents  (Read 2919 times)

BrianYee

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
DocumentGenerator not Using Template with Defined Documents
« on: September 16, 2020, 04:17:01 am »
Hello,

I am writing a script which automatically generates all Defined Documents for a model. It does this by querying the Notes column of the t_trxtypes and through some string splitting and joins gets string values for the Document Template, Table of Contents template, style sheet, and cover page template which are then used as arguments with DocumentGenerator.

The problem is that for some of the document templates (not TOCs, style sheets, or cover pages), what is generated by DocumentGenerator is different from what is created using the same templates through Report Builder. I have verified that the template name (templateName) used as an argument in DocumentPackage(packageID, 0, templateName) is valid and actually exists in t_document. For some of the defined documents it works perfectly but for others it creates an empty document apart from the specified cover page and TOC.

Has anyone had this issue? Where should I start looking to find the problem? I can provide code snippets if needed.

Thanks in advance,
Brian