Checkbox “like” in Word and PDF

Form fields are not supported in RPE. What I mean here is, clickable check box isn’t supported. However, pictogram of a check box  can be achieved via symbols in Word.

Thanks to Dragos for the solution.

The template looks like the below screenshot. Get the template here.


Checked and unchecked in Word document as below.



Best Practices for building RPE Template – Part 2

Continuing from Best Practices for building RPE Template – Part 1

Template creation guidelines


  • Debug statements Have debug statements within the template at different stages using _sessionLogger default internal variable. Control printing of debug statements using your own internal RPE variable (say _debugEnabled).
  • Session Information: Get session information like output path, template path, etc using _sessionInfo default internal variable. See details at Accessing the docgen configuration information in JavaScript.
  • Template comment: Add template comment element at different stages within the template explaining what the current section is used for. This would act as self documenting the template.
    • Template element: Provide name and descriptions to template elements. This helps understanding the purpose of the element template when you or others read the template after some time.

Continue reading “Best Practices for building RPE Template – Part 2”

Best Practices for building RPE Template – Part 1

It is important to build RPE template by following standard guidelines so that it would help greatly in maintaining the template for longer time. I’ll not target any specific data source here. These are general guidelines that could be followed while building or updating RPE template.


General Guidelines

  • Have separate templates for title, contents, end game so that some of them could be reused across document specifications. Include multiple templates in a single document specification (dsx) for document generation.
    • Whenever possible, use style sheet (word template) for title page instead of building it within RPE template. You could use the style sheet for Word and PDF output formats in document specification.
  • Keep templates small so that it can be managed easily for longer time.
  • Use notes (text) file to store various examples URLs. These will act as quick help while looking for data source and schema URLs. The same goes for JavaScript codes.

Part 2 – Template creation guidelines


Using JavaScript Objects/Arrays during iteration

When a JavaScript Array is populated with attributes within query on a container, you will notice that the Array object holds data for future iterations of the query while in the current iteration. This is because of how RPE processes the data and write to the output document in separate threads.

The solution here is to use additional variable called _arrayLength, which should be incremented for every query iteration and any operation on the Array should be through _arrayLength RPE variable.


Continue reading “Using JavaScript Objects/Arrays during iteration”