Word Template - Tips and Tricks
As the Word Templates are highlight customisable we put together some guidelines and advice on how to set it up.
WHAT YOU CAN DO USING THE WORD TEMPLATE
Using the word template, you can change
The header (adding your own logo or modify the project information included (see available fields below)
Default fonts for headings and text
Change list and other styles
Note: the default template contains two pages which BOTH need to be kept, one for portrait and one for landscape mode
HOW TO DO IT
To modify the styles of generated Word and PDF documents
Download the default template (empty)
Modify it as needed (see above – note: keep both pages)
Upload it again to Matrix (through Select Word Document)
Create a DOC or PDF to test it
If needed download and fix the modified template
HOW DOCUMENT GENERATION WORKS
The DOC items in Matrix consists of some sections, which define how the data from the database is rendered (e.g. as list of requirements or trace matrix). The Word template define the basic look of the page, e.g. fonts for headings or page header and footers.
DEFAULT FIELDS FOR HEADERS / FOOTERS
These fields can be added in the header or footer. When a DOCX or PDF is generated from Matrix, their value is computed and inserted accordingly. To add the fields you can:
Copy them from this document, or
Toggle the macros in word (using Use Alt-F9) and edit them manually
Insert them through the UI (Note this depends on the version of word)
Select the tab Insert than Quick Parts / Fields
Select DocProperties and the property name from the table belo
Document Property Name
Is the company name (first part of the url of the projects)
For a URL “demo.matrixreq.com” it would be
Just the project Id
Just the project name
Wheelchair for children
Is the name of the report as defined in the xslt template of the report
Test Status and Planning Report
Is the report creation date (or date when a signed document was created, not the download or signature date) in the time zone and format specified for the server (customer)
The date the PDF or WORD file was created. This differs from the DateXML above (for SIGNED documents).
For normal reports just a number reflecting how many times the report has been generated.
The document id of a controlled document
The revision (number of times the document has been generated)
The revision (number of times the document has been generated) without leading 0
The email of the person who created the report (the person who created the signed document or downloads the report / controlled document)
The full name of the person who created the report (the person who created the signed document or downloads the report / controlled document)
The id of the report. For signed documents it is the name of the underlying controlled document.
A link to the report
The id of document or report
DOC-12, SIGN-13, or REPORT-12
The link of the report, document, ...
The url of the report, document ...
Shows ID of used controlled document for DOC and SIGN
The link to the DOC for DOC and SIGN
<a href=”project.matrixreq.com/.../DOC- 12>DOC-12</a>
The URL of the originating DOC
The value of the sourceRef Field
Insert a revision number defined in the last row of a table of the document table with a revision columns (see IFU)
MX_DocProperty_1 (also 2,3, ...9)
Can be mapped to a text line in a DOC (see IFU) e.g. to fill a title page
Some text entered in a text line of the DOC
You can also modify the default styles and fonts used by documents. To do some type some text in the template, select the style, modify the style and apply it (as you would normally do to change the style in a complete word document). Besides the standard styles, like Heading 1,2,3 etc., there are also some special styles (e.g. mr_fieldname) which are used to format some specific text in the generated documents. See some examples below.
Note: richtext fields are formatted using the style applied to text in the field itself and some css rules which can be modified in the admin client (in the settings Word / Pdf Styling).
Normal text uses the style “Normal”.
CUSTOM PARAGRAPH STYLES
Used to define entire graphs
Name of fields
Values of fields in table cells
Path of items in item table
used to highlight text inside paragraphs:
Id and name of an item: e.g.
REQ-125 Performance Requirement
Number in statistic table, e.g. 23 Requirements
Link to items inside the document
e.g. colors for table cell background
Background of header cells in tables.
CUSTOM FIELDS FOR HEADERS / FOOTERS
ADDING SMART TEXT BLOCKS
In Matrix it is possible to define smart text blocks which can be inserted into rich text fields or the document template. To use smart text tag in a template, do the following
Make sure it is a plain text template defined for the project
Create a custom property in Word, e.g. in Word 2007:
Insert it in the template (header or footer)
To insert it, select the insert tab and choose Quick Parts > Insert
Choose DocProperty as Field name the wanted property
The new field should be in the document, e.g.