Book a Demo

Author Topic: RTFTemplate print value from Custom Query Jscript  (Read 3317 times)

ggandhi

  • EA User
  • **
  • Posts: 28
  • Karma: +0/-0
    • View Profile
RTFTemplate print value from Custom Query Jscript
« on: December 20, 2013, 10:22:10 pm »
I have used the standard RTFTemplate editor to list elements in a diagram. I want this list to be printed only under certain conditions. This RTFTemplate supports a generic Model Document in a Virtual Document used by my customers. I believe my solution is to use an RTFTemplate Custom Query Custom JScript Script. I cannot see examples of how an RTFTemplate prints the value returned from an RTFTemplate Custom Query Custom JScript Script. How must I code an RTFTemplate to print the value returned from an RTFTemplate Custom Query Custom JScript Script? How can I script my RTFTemplate to include or exclude the 'Table of Elements', based on the substr of diagram name? Alternatively, how can I script my RTFTemplate to include or exclude the 'Table of Elements', based on the diagram type? I have succesfully built an RTFTemplate that prints a field returned from a Custom Query Custom SQL. Please show me examples of how an RTFTemplate prints the value returned from an RTFTemplate Custom Query Custom JScript Script.
« Last Edit: December 20, 2013, 10:26:46 pm by ggandhi »

Dermot

  • EA Administrator
  • EA User
  • *****
  • Posts: 591
  • Karma: +7/-0
    • View Profile
Re: RTFTemplate print value from Custom Query Jscr
« Reply #1 on: December 23, 2013, 02:47:09 pm »
For some examlpes on using the RTF Custom Query see the Learning Center topic (Alt+f1), Reporting | RTF Template Fragments.
However from what you are describing you may need to use the Automation DocumentGenerator script to achieve this custom exclusion (rather than using straight templates)  - see:
http://www.sparxsystems.com/enterprise_architect_user_guide/10/automation_and_scripting/document_generator_interface.html